比赛 |
NOIP_2 |
评测结果 |
WWAWWWWWWW |
题目名称 |
到天宫做客 |
最终得分 |
10 |
用户昵称 |
Hamster |
运行时间 |
0.000 s |
代码语言 |
Pascal |
内存使用 |
0.00 MiB |
提交时间 |
2008-09-08 21:24:27 |
显示代码纯文本
program heaven;
const
month:array[1..12] of real=(31,29,31,30,31,30,31,31,30,31,30,31);
var
n,i,j,x,y:integer;
ss,xx,s:real;
fin,fout:text;
begin
assign(fin,'heaven.in');
reset(fin);
assign(fout,'heaven.out');
rewrite(fout);
readln(fin,n);
ss:=0;
for i:=1 to n do
begin
readln(fin,x,y);
xx:=0;
for j:=1 to x-1 do xx:=month[j]+xx;
ss:=xx+y-ss;
if ss>s then s:=ss;
end;
if s<366-xx then s:=366-xx;
s:=s-1;
writeln(fout,s/366*24*3600:0:0);
close(fin);
close(fout);
end.