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:请帮忙看看吧。老是WAIn Reply To:Re:请帮忙看看吧。老是WA Posted by:wxh_8989 at 2009-05-28 15:18:45 > > A了十分感谢你!!! > 想再请问一下 为什么while(int(s*100)<int(a*100))会WA的? > The cast to "int" rounds down the figures after the decimal fractions. ex) case s=0.1234 a=0.1235 s < a ===> true but int(s*100) < int(a*100) ===> false because int(s*100) == 12 int(a*100) == 12 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator