hdu1753 大明A+B

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Scanner;
import java.text.*;
import java.util.*;
import javax.crypto.CipherInputStream;

import java.io.*;
import java.lang.reflect.Array;

public class Main {//hdu1753
    public static void main(String[] args){
        Scanner cin=new Scanner(new BufferedInputStream(System.in));
        while(cin.hasNext()){
            BigDecimal a=cin.nextBigDecimal();
            BigDecimal b=cin.nextBigDecimal();
            a=a.add(b);
            a=a.stripTrailingZeros();
            String ans=a.toPlainString();
            System.out.println(ans);
        }
    }
}

你可能感兴趣的:(hdu1753 大明A+B)