#include<iostream>
using namespace std;
int main(){
double miles;
int time,fee;
while(cin>>miles>>time){
if(miles<=3)
fee=10+(time/5)*2;
else if(miles<=10)
fee=int(10+(miles-3)*2+(time/5)*2+0.5);//+0.5为四舍五入
else
fee=int(24+(miles-10)*3+(time/5)*2+0.5);
cout<<fee<<endl;
}
return 0;
}
分支-04. 出租车计价(15),布布扣,bubuko.com
原文地址:http://www.cnblogs.com/gnodidux/p/3819691.html