Cod sursa(job #25375)
Utilizator | Data | 4 martie 2007 12:18:13 | |
---|---|---|---|
Problema | Magazin | Scor | 5 |
Compilator | fpc | Status | done |
Runda | preONI 2007, Runda 3, Clasele 11-12 | Marime | 0.26 kb |
var i,p,n,m,k,x,y,s:longint;
f:text;
begin
assign(f,'magazin.in');
reset(f);
readln(f,p,n,m,k);
for i:=1 to n do
begin
readln(f,x,y);
s:=s+y;
end;
close(f);
s:=s+n*k+6;
assign(f,'magazin.out');
rewrite(f);
writeln(f,s);
close(f);
end.