Pagini recente » Cod sursa (job #1352553) | Cod sursa (job #1191514) | Cod sursa (job #6918) | Cod sursa (job #1201025) | Cod sursa (job #7740)
Cod sursa(job #7740)
program fact;
var n2,n5,nn,i,p,n,aux:longint;
fin,fout:text;
{*---------MAIN-----------------*}
begin
assign(fin,'fact.in');
assign(fout,'fact.out');
reset(fin);
rewrite(fout);
readln(fin,p);
n:=0;
if p > 9 then
begin
aux:=p div 10;
n:=5;
for i:=1 to aux do
n:=n+40;
end;
if p mod 10 > 0 then for i:=1 to p mod 10 do
n:=n+5;
writeln(fout,n-1);
close(fout);
end.