Pagini recente » Cod sursa (job #1544395) | Cod sursa (job #2312529) | Cod sursa (job #106772) | Cod sursa (job #3149871) | Cod sursa (job #6750)
Cod sursa(job #6750)
program fact;
{$APPTYPE CONSOLE}
uses
SysUtils;
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:=5;
if p > 9 then
begin
aux:=p div 10;
for i:=1 to aux do
n:=n+40;
end;
if p mod 10 > 0 then for i:=1 to p mod 10-1 do
n:=n+5;
writeln(fout,n);
close(fout);
end.