只有60分啊!求大佬解答!!!

P1422 小玉家的电费

@[zzy1311602379](/space/show?uid=192845) 第三档为什么*1.5663 事实上是0.5663
by hfee @ 2019-04-14 22:07:25


@[白狼与玫瑰](/space/show?uid=123936) 额。。。尴尬。。。
by zzy1311602379 @ 2019-04-28 19:20:44


#include<iostream> using namespace std; int main() { int a; double d; cin>>a; if(a<=150) d=a*0.4463; else if(a>=151&&a<=400) d=150*0.4463+(a-150)*0.4663; else if(a>=401) d=150*0.4463+250*0.4663+(a-400)*0.5663; d=int((d*10)+0.5)/10.0; cout<<d; return 0; }
by 暮色微凉 @ 2019-07-24 18:27:16


|