1212
import java.math.*;
import java.util.*;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
BigInteger a,b;
Scanner cin = new Scanner(System.in);
while(cin.hasNext()){
a = cin.nextBigInteger();
b = cin.nextBigInteger();
BigInteger result[]=a.divideAndRemainder(b);//求出余数的除法操作
System.out.println(result[1]);
}
}
}
1753
import java.math.*;
import java.util.*;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
BigDecimal a,b;
Scanner cin = new Scanner(System.in);
while(cin.hasNext()){
a = cin.nextBigDecimal();
b = cin.nextBigDecimal();
BigDecimal c=a.add(b);
System.out.println(c.stripTrailingZeros().toPlainString());
}
}
}