Pascal high precision multiplication is used to correct mistakes, and good corrections will naturall

Updated on technology 2024-04-11
3 answers
  1. Anonymous users2024-02-07

    This is taught by the teacher in the classroom, and it is highly accurate.

    type data=array [0..10000] of longint;

    vara,b,c:data;

    s,s1:ansistring;

    i,l:longint;

    procedure ds;

    beginreadln(s1);

    l:=length(s1);

    repeat

    s:=copy(s1,l-3,4);

    a[0]:=a[0]+1;

    val(s,a[a[0]])

    delete(s1,l-3,4);

    l:=l-4;

    until l<=0;

    readln(s1);

    l:=length(s1);

    repeat

    s:=copy(s1,l-3,4);

    b[0]:=b[0]+1;

    val(s,b[b[0]])

    delete(s1,l-3,4);

    l:=l-4;

    until l<=0;

    end;procedure cf;

    vari,j,len,x:longint;

    beginfor i:=1 to a[0] dobeginx:=0;

    for j:=1 to b[0] do

    beginx:=a[i]*b[j]+x div 10000+c[i+j-1];

    c[i+j-1]:=x mod 10000;

    end;c[i+j]:=x div 10000;

    end;len:=a[0]+b[0];

    while (c[len]=0) and (len>1) do dec(len);

    c[0]:=len

    end;procedure print;

    begin;

    for i:=c[0] downto 1 dobeginif i<>c[0] then

    beginif c[i]<1000 then write(0);

    if c[i]<100 then write(0);

    if c[i]<10 then write(0);

    end;write(c[i]);

    end;end;

    beginds;

    cf;print;

  2. Anonymous users2024-02-06

    program p1;

    vara:array[0..10000] of integer;

    b:array[0..10000] of integer;

    c:array[0..10000] of integer;

    len,x,i,j:integer;

    beginreadln(len);

    a[0]:=len;

    b[0]:=len;

    c[0]:=len;

    for i:=len downto 1 do read(a[i]);

    readln;

    for i:=len downto 1 do read(b[i]);

    readln;

    for i:=1 to len do

    for j:=1 to len do

    beginc[i+j-1]:=c[i+j-1]+a[i]*b[j];

    c[i+j]:=c[i+j]+c[i+j-1] div 10;

    c[i+j-1]:=c[i+j-1] mod 10 ;

    end;len:=len*2;

    while c[len]=0 do

    dec(len);

    for i:=len downto 1 dowrite(c[i]);

    writeln;

    end.— Know that you are welcome to join the team pas world!

  3. Anonymous users2024-02-05

    Some of the above mistakes may be awarded 100 points without being corrected. This is because the test data may not detect such errors.

    Strictly speaking, if there is an example that I gave. Then there is no output. Because there will be no illegal access to A[501].

    So it will cause a running error.

Related questions
4 answers2024-04-11

Second floor. Are you ready to add from 1 to n one by one? >>>More

5 answers2024-04-11

Find the "Deep Hole Forum", which specializes in discussing deep hole processing and other related technical exchanges. >>>More

5 answers2024-04-11

Doesn't that make sense.

6 answers2024-04-11

Printers are currently up to 9600dpi

Laser machine normal 600dpi >>>More