fork download
  1. import java.math.*;
  2. class BI{
  3. public static void main(String[] args){
  4. BigInteger a = new BigInteger("5999856");
  5. BigInteger b = new BigInteger("99992800");
  6. BigInteger c = new BigInteger("100000000");
  7. BigInteger r1, r2, r3, res;
  8. r1 = (a.multiply(a)).multiply(a);
  9. r2 = (b.multiply(b)).multiply(b);
  10. r3 = (c.multiply(c)).multiply(c);
  11. res = (r1.add(r2)).add(r3);
  12. System.out.println("ans:"+res);
  13. }
  14. }
Success #stdin #stdout 0.12s 321600KB
stdin
Standard input is empty
stdout
ans:1999999999999999997014016