Cod sursa(job #561467)

Utilizator Breje_RaulRaul Breje Breje_Raul Data 20 martie 2011 15:12:34
Problema Cifra Scor 0
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.43 kb
 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.