HELP!!Why I don't AC???!!

P1591 阶乘数码

ghruik @ 2017-04-28 11:22:35

var n,i,j,k,max:longint;a,b:array[1..10000] of longint;
begin
readln(n);
for i:=1 to n do
readln(a[i],b[i]);
for i:=1 to n do
begin
k:=1;
max:=0;
for j:=1 to a[i] do
k:=k*j;
while k<>0 do
begin
if k mod 10=b[i] then inc(max);
k:=k div 10;
end;
writeln(max);
end;
end.
错误在哪?!

by ShadowAA @ 2017-04-28 11:24:31

脑子呢


by 琴音·袅袅 @ 2017-04-28 11:25:09

滑稽吧


by ghruik @ 2017-04-28 11:26:56

你们两个zz别吵吵


by 大fanchuan @ 2017-04-28 11:26:56

厕长要用高精


by 大fanchuan @ 2017-04-28 11:29:16

var
  len,n,i,j,h,k:longint;
  a,b:array[1..100]of longint;
begin
  readln(n);
  a[1]:=1;
  for i:=1 to n do
    begin
      k:=0;
      for j:=1 to 100 do
        begin
          h:=a[j]*i+k;
          a[j]:=h mod 10;
          k:=h div 10;
        end;
      k:=0;
      for j:=1 to 100 do
        begin
          h:=b[j]+a[j]+k;
          b[j]:=h mod 10;
          k:=h div 10;
        end;
    end;
  len:=100;
  while b[len]=0 do
    len:=len-1;
  for j:=len downto 1 do
    write(b[j]);
  writeln;
  readln;
  readln;
end.

by 大fanchuan @ 2017-04-28 11:30:11

呵呵


by 琴音·袅袅 @ 2017-04-28 11:34:47

这都不会****


by 大fanchuan @ 2017-04-28 11:40:10


by LOVEMY @ 2018-04-05 19:52:51


|