Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
1513 邓小龙 08打车费用 C++ Accepted 0 MS 268 KB 465 2023-10-14 16:37:12

Tests(10/10):


Code:

# include<iostream> using namespace std; int main(){ int s; float m; cin>>s; if(s<=2){ //x<=2 m=6*1.0; cout<<m; } else{ //x>2 if(s>2 && s<=10){ //2<x<=10 m=6+(s-2)*1.8; cout<<m; } else{//x>10 m=6+(10-2)*1.8+(s-10)*(1.8*1.5); cout<<m; } } }