标签:大数类 biginteger bigdecimal acm
1.1 2.9 1.1111111111 2.3444323343 1 1.1
4 3.4555434454 2.1java 水过~。import java.io.*; import java.util.*; import java.math.*; public class Main { public static void main(String[] args) { Scanner in=new Scanner(System.in); BigDecimal a,b; int i,j; while(in.hasNext()){ a=in.nextBigDecimal(); b=in.nextBigDecimal(); //去掉末尾的0 并转换成无科学计数法的字符串输出 System.out.println(a.add(b).stripTrailingZeros().toPlainString()); } } }
标签:大数类 biginteger bigdecimal acm
原文地址:http://blog.csdn.net/qq_16255321/article/details/39557399