1 条题解
-
0
#include <bits/stdc++.h> using namespace std; int main(){ int x; cin>>x; double price=0; if(x>30){ cout<<"Fail"; return 0; } if(x<=10) price= x*0.8; else if(x<=20) price=(x-10)*0.75+8; else if(x<=30) price=(x-20)*0.7+8+7.5; cout<<fixed<<setprecision(2)<<price+0.2; return 0; }
- 1
信息
- ID
- 30
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 8
- 标签
- 递交数
- 399
- 已通过
- 47
- 上传者