比赛 20111109 评测结果 AAAAAAAAAA
题目名称 摩托车游戏 最终得分 100
用户昵称 Des. 运行时间 0.000 s
代码语言 Pascal 内存使用 0.00 MiB
提交时间 2011-11-09 09:16:23
显示代码纯文本
program carz;
uses math;
var f:array[0..1000]of real;
    t,k,m,n,i,j,s:longint;
    r:real;
const c:array[1..4]of real=(0.1,2/9,3/8,4/7.5);
begin
assign(input,'carz.in');
reset(input);
assign(output,'carz.out');
rewrite(output);
readln(s,r);
f[1]:=0.1;
f[2]:=2/9;
f[3]:=3/8;
f[4]:=4/7.5;
for i:=5 to s div 10 do
  f[i]:=i/7;
for i:=1 to s div 10 do
  for j:=1 to 4 do
    if i>=j then
      f[i]:=min(f[i],f[i-j]+r/60+c[j]);
writeln(f[s div 10]:0:2);
close(output);
end.