cloned from srcbox.
[furry-nemesis.git] / poj / poj2017.pas
blob1f73742f9f6ca5189a291c83e3c07f70f60c573f
1 var
2 n,s,t,p,i,sum:longint;
4 begin
5 readln(n);
6 while n<>-1 do
7 begin
8 p:=0; sum:=0;
9 for i:=1 to n do
10 begin
11 readln(s,t);
12 sum:=sum+s*(t-p);
13 p:=t;
14 end;
15 writeln(sum,' miles');
16 readln(n);
17 end;
18 end.