Cod sursa(job #140145)
Utilizator | Data | 21 februarie 2008 13:03:24 | |
---|---|---|---|
Problema | Cifra | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.36 kb |
program p1;
var f,g:text;
n,i,t,y,q,e,b,uc:longint;
begin
assign(f,'cifra.in');reset(f);
assign(g,'cifra.out');rewrite(g);
readln(f,n);
e:=0;
uc:=1;
q:=0;
for i:=1 to n do
begin
readln(f,t);
e:=t;
uc:=1;
for i:=1 to e
do
begin
uc:=(uc*e)mod 10;
end;
q:=(q+uc)mod 10;
writeln(g,q);
end;
close(f);
close(g);
end.