Cod sursa(job #560863)
Utilizator | Data | 18 martie 2011 18:34:38 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.41 kb |
var n,p,a,b,d,i:longint;
begin
readln(p);
if p=5 then write('-1');
n:=1; b:=1;
//while p<>0 do begin
for i:=1 to n do begin
//if (i mod 2)=0 then inc(a);
if (i mod 5)=0 then inc(b);
d:=n;
inc(n);
end;
// if a>b then if (a-(a-b))=p then write(d);
if b=p then write(d,' ');
//end;
readln;
end.