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

Re:G++里难道用%f输出double才是正确的?

Posted by resty at 2009-06-24 20:53:21 on Problem 3164
In Reply To:G++里难道用%f输出double才是正确的? Posted by:ZhangChi at 2009-06-24 20:04:52
> 我的输出部分。。
> 
> 		double answer = 0;
> 		for (int i = 1; i < T; ++i)
> 			if (link[i] == -1)
> 				answer += preE[i] + sum[i];
> 
> 		printf ("%.2f\n", answer);
> 
> %f就过……%lf就WA,严重的不懂了。。。
貌似g++ %.2lf有问题,我曾在这个上面挂惨了。最后人工*100再四舍五入

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