fork download
  1. import java.math.BigInteger;
  2.  
  3. class Exponentiation
  4. {
  5. public static void main (String[] args) throws java.lang.Exception
  6. {
  7. BigInteger x = new BigInteger("3");
  8. int n = 5;
  9. BigInteger z = x.pow(n);
  10. System.out.println(z);
  11. System.out.println(x);
  12. }
  13. }
Success #stdin #stdout 0.09s 320320KB
stdin
Standard input is empty
stdout
243
3