这个代码怎么回事,为什么不行?

P1422 小玉家的电费

呃呃呃。。。C++党表示看不懂
by Deny_小田 @ 2016-05-18 20:08:41


因为要注意:是超出150的部分按0.4663收费,所以,语句:if n>150 and n<=400 then ans:=0.4463\*150+0.4663\*n;应该改为if n>150 and n<=400 then ans:=0.4463\*150+0.4663\*(n-150);下面的那句也是,改过来就可以了。
by RICKLEE @ 2016-05-18 21:39:54


|