Pagini recente » Cod sursa (job #1188792) | Cod sursa (job #1279409) | Cod sursa (job #1370544) | Cod sursa (job #6598) | Cod sursa (job #6743)
Cod sursa(job #6743)
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:=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);
close(fout);
end.