社区讨论
60求调
P1422小玉家的电费参与者 1已保存回复 1
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 1 条
- 当前快照
- 1 份
- 快照标识符
- @mli8t7j1
- 此快照首次捕获于
- 2026/02/12 00:27 上周
- 此快照最后确认于
- 2026/02/14 11:20 5 天前
CPP
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
if(n<=150){
cout<<fixed<<setprecision(1)<<0.4463*n;
}
else if(n<=400){
cout<<fixed<<setprecision(1)<<0.4463*150+(n-150)*0.4663;
}
else{
cout<<fixed<<setprecision(1)<<0.4463*150+(400-150)*0.4663+n-400*0.5663;
}
return 0;
}
回复
共 1 条回复,欢迎继续交流。
正在加载回复...