#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)
时间: 2024-08-18 03:34:18