HDU 1753 简单大数
View Code
1 import java.util.*; 2 import java.math.*; 3 import java.io.*; 4 5 public class Hdu1715{ 6 public static void main(String args[]){ 7 String s1; 8 BigDecimal a,b; 9 Scanner cin = new Scanner(System.in); 10 11 while(cin.hasNext()){ 12 13 a = cin.nextBigDecimal(); 14 b = cin.nextBigDecimal(); 15 a = a.add(b); 16 s1 = a.stripTrailingZeros().toPlainString(); 17 System.out.println(s1); 18 } 19 20 21 } 22 23 }