I need to calculate this: 2894135^3787313 mod 4028033
As you can see below i tried to use the BigInteger because i have really huge numbers.
import java.lang.Math;
import java.util.Scanner;
public class BigInteger extends Number implements Comparable<BigInteger>
{
public static void main(String[] args)
{
BigInteger result=new BigInteger(Math.pow(2894135,3787313) % 4028033);
System.out.println(result);
}
}
Error:
/tmp/java_Wcf144/BigInteger.java:19: error: BigInteger is not abstract and does not override abstract method doubleValue() in Number public class BigInteger extends Number implements Comparable ^ /tmp/java_Wcf144/BigInteger.java:24: error: constructor BigInteger in class BigInteger cannot be applied to given types;
BigInteger result=new BigInteger(Math.pow(2894135,3787313) % 4028033); ^ required: no arguments found: double reason: actual and formal argument lists differ in length 2 errors