比赛 07级noip练习1 评测结果 AAWWWWWWWA
题目名称 守望者的逃离 最终得分 30
用户昵称 0彼岸0 运行时间 0.000 s
代码语言 Pascal 内存使用 0.00 MiB
提交时间 2008-09-22 21:10:41
显示代码纯文本
program escape;
var m, i: integer;
    s, currents, t, currentt: longint;
begin
    assign(input,'escape.in');
    assign(output,'escape.out');
    reset(input);
    rewrite(output);
    readln(m, s, t);
    currents:=0;
    currentt:=0;
    i:=m div 10;
    m:=m mod 10;
    currents:=currents+60*i;
    currentt:=currentt+i;
    while (currentt<t) and (currents<s) do begin
         if m>=10 then
                 begin M:=M-10; CurrentS:=currents+60;
                 end
         else
                if m<6 then currents:=currents+17
                else m:=m+4;
         currentt:=currentt+1
    end;

    if (s-currents)<=0 then
             begin writeln('Yes');
              writeln(currentt);
             end
    else
             begin writeln('No');
              writeln(currents+17);
             end;

    close(input);
    close(output);
end.