Pagini recente » Cod sursa (job #652643) | Cod sursa (job #2445193) | Cod sursa (job #1098414) | Cod sursa (job #1244286) | Cod sursa (job #561467)
Cod sursa(job #561467)
uses math;
var i,s,j,t,n,u,p:longint;
function pt(x:integer):integer;
begin
p:=1;s:=0;
for i:=1 to n do
begin
for j:=1 to n do
p:=p*j;
s:=s+p;
end;
writeln(s mod 10);
end;
begin
assign(input,'cifra.in');reset(input);
assign(output,'cifra.out');rewrite(output);
readln(t);
while not eof(input) do
begin
readln(n);
pt(i);
end;
close(input);
close(output);
end.