Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
157457 杨正蠔 08打车费用 C++ Accepted 1 MS 280 KB 470 2026-07-24 09:33:50

Tests(10/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int x; cin>>x; if (x<=2){ cout<<6<<endl; } else if(x>2&&x<=10){ cout<<(x-2)*1.8+6<<endl; } else{ cout<<6+1.8*8+(x-10)*1.5*1.8<<endl; } return 0; }