Cod sursa(job #556162)
| Utilizator | Data | 15 martie 2011 23:25:57 | |
|---|---|---|---|
| Problema | Cifra | Scor | 0 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.44 kb |
var a,n,i,j,s,k:longint;
begin
assign(input,'cifra.in');reset(input);
assign(output,'cifra.out');rewrite(output);
readln(input,n);
for i:=1 to n do
begin
readln(input,a);
s:=0;
for j:=1 to a do
begin
if j<>3 then k:=trunc(exp(j*ln(j)))
else k:=trunc(exp(j*ln(j)))+1;
s:=s+k;
end;
writeln(output,s mod 10);
end;
close(input);
close(output);
end.
