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

这两段一样的吧,但为什么1WA 1 A 呢???十分不解。。

Posted by z__jj at 2009-07-26 23:16:13 on Problem 3621
b是int ,以下输出结果的两段代码不一样吗?
 
printf("%.2lf\n",double(b)/1000.0);          (WA)


看了网上代码要这样的:                              (AC)
 int tt=b%10;
if(tt>=5)b+=10-tt;
else b-=tt;
printf("%.2lf\n",double(b)/1000.0);

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