Create 1753_appte.java

From http://blog.csdn.net/appte/article/details/8642274
This commit is contained in:
Kirigaya Kazuto 2016-08-17 15:17:00 +08:00 committed by GitHub
parent 786b908fce
commit a223bdc280

22
HDOJ/1753_appte.java Normal file
View File

@ -0,0 +1,22 @@
import java.util.Scanner;
import java.math.*;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scanner=new Scanner(System.in);
BigDecimal a,b;
while(scanner.hasNextBigDecimal()){
a=scanner.nextBigDecimal();
b=scanner.nextBigDecimal();
a=a.add(b);
String s=a.stripTrailingZeros().toPlainString();
System.out.println(s);
}
}
}