|
|
back to boardWA 7 why? var sum,ans,a,b,c,a1,b1,c1,n:longint; i,j:longint; begin readln(n); sum:=1;ans:=0;a:=2;b:=3;c:=4;a1:=1;b1:=1;c1:=1; for i:=1 to n do begin a1:=a1*a; a1:=a1 mod 1000; b1:=b1*b; b1:=b1 mod 1000; c1:=c1*c; c1:=c1 mod 1000; end; sum:=sum+a1+b1+c1; while sum<>0 do begin if sum mod 10=0 then inc(ans); sum:=sum div 10; end; writeln(ans); end. |
|
|