Cod sursa(job #413914)
| Utilizator | Data | 9 martie 2010 13:16:59 | |
|---|---|---|---|
| Problema | Factorial | Scor | 10 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.28 kb |
var p : longint;
n : longint;
t : text;
begin
assign(t,'fact.in');
reset(t);
readln(t,p);
n:=1;
while p<>0 do begin inc(n);
if n mod 5=0 then dec(p);
end;
close(t);
assign(t,'fact.out');
rewrite(t);
writeln(t,n);
close(t);
end.