Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

换类型时,常可以这样做的,+0.5确保正确性,有时int里要用pow之类函数时,也故意+0.5的,小技巧!

Posted by longpo at 2009-04-06 01:12:43 on Problem 3724
In Reply To:Re:比较DOUBLE相等时要用int( X×1000+0.5) FT Posted by:smallbox at 2009-04-06 01:04:38
换类型时,常可以这样做的,+0.5确保正确性,有时int里要用pow之类函数时,也故意+0.5的,小技巧!

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator