Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5412 邓小龙 08打车费用 C++ Accepted 0 MS 268 KB 348 2024-11-16 09:28:33

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ int s;//存走的距离 double m=0; cin>>s; if(s<=2){//距离在2km之内 m=6; } else if(s<=10){//距离在>2且<=10之内 m=6+(s-2)*1.8; } else{//距离>10 m=6+1.8*8+1.8*1.5*(s-10); } cout<<m<<endl; return 0; }