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

用Java的同志们

Posted by viral at 2008-06-26 01:45:25 on Problem 1018 and last updated at 2008-06-26 01:46:27
如果你是用的System.out.println(),那一定要注意小数点后三位的要求,不能多也不能少。这不只是小数位数过多时四舍五入的问题,还包括小数位数过少时补0的问题(我就把问题的后一半忘了,光想着四舍五入了...)

比如结果是1.0,输出必须是1.000,要不就WA。

还是用System.out.format()更省心,跟printf()一样。

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