I. The basic idea of high-precision multiplication is the same as that of addition. The basic process is as follows:
① Read the multiplier S1 and S2
② Divide S1 and S2 into four segments and convert them into values that exist in arrays A and B. Write down the lengths of A and B, K1 and K2;
③ I is assigned the bitwise in B;
④ Obtain the multiplication of the I-th and A from B and accumulate it into the C of another array. (Note: The number of wrong digits should be
?)
⑤ I: = I-1; Detection I value: less than K2 to turn 6, otherwise turn 4
6. Print the result
Example:ProgramDownload
Program chengfa;
Const n = 100;
Type AR = array [1 .. n] of integer;
VaR A, B: Ar; K1, K2, K: integer;
C: array [1 .. 200] of integer;
S1, S2: string;
Procedure Fenge (S: string; var D: Ar; var KK: integer );
VaR SS: string;
I, code: integer;
Begin
I: = length (s );
KK: = N;
Repeat
SS: = copy (S, I-3, 4 );
Val (SS, d [Kk], Code );
KK: = kk-1;
S: = copy (s, 1, I-4 );
I: = I-4;
Until I <0;
KK: = KK + 1;
End;
Procedure daying;
VaR I: integer;
Begin
Write (C [k]);
For I: = k + 1 to 2 * n do begin
If C [I] <1000 then write ('0 ');
If C [I] <100 then write ('0 ');
If C [I] <10 then write ('0 ');
Write (C [I]);
End;
Writeln;
End;
Begin
Init;
Jisuan;
Daying;
End.