Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:帮忙看看我这程序吧~~~哪儿有问题啊~~大虾帮忙In Reply To:帮忙看看我这程序吧~~~哪儿有问题啊~~大虾帮忙 Posted by:snowfall at 2008-03-22 21:16:44 sum=n/k; 你确定k能整除n吗.比如n=5;k=2,就不能这样除. 不能确定整除的时候,不要用除法. 如果你先全部乘的话,又会越过int取值范围.不要硬搞了,想一想处理方法吧. Warning: Don't underestimate the problem. The result will fit into an integer - but if all intermediate results arising during the computation will also fit into an integer depends on your algorithm. The test cases will go to the limit. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator