mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
23 lines
436 B
Java
23 lines
436 B
Java
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);
|
|
}
|
|
}
|
|
|
|
}
|