Cod sursa(job #586404)
Utilizator | Data | 30 aprilie 2011 22:54:31 | |
---|---|---|---|
Problema | Factorial | Scor | 5 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
Program Factorial; uses crt;
var i,j,f:integer;
p,l :longint;
f1,f2:text;
begin clrscr;
assign(f1,'fact.in'); reset(f1);
assign(f2,'fact.out'); rewrite(f2);
readln(f1,p);
l:=(p*10) div 2;
if p>4 then dec(l,5);
if p=5 then writeln(f2,'-1') else write(f2,l);
close(f1); close(f2);
end.