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 |
Java似乎太狠了一点~完全屏蔽了细节问题,只需A+B~import java.io.BufferedInputStream; import java.math.*; import java.util.*; public class Main{ public static void main(String[] args){ Scanner cin = new Scanner(new BufferedInputStream(System.in)); int n=cin.nextInt(); for(int i=1;i<=n;i++){ BigDecimal a = cin.nextBigDecimal(); BigDecimal b = cin.nextBigDecimal(); System.out.println(a.add(b)); } } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator