@@ -0,0 +1,530 @@
+import java.io.BufferedReader;%0Aimport java.io.IOException;%0Aimport java.io.InputStreamReader;%0Aimport java.math.BigInteger;%0A%0Apublic class ModularExponentiation %7B%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));%0A        int n = Integer.parseInt(reader.readLine());%0A        BigInteger m = new BigInteger(reader.readLine());%0A        BigInteger result = m.mod(BigInteger.valueOf(2).pow(n));%0A        System.out.println(result);%0A    %7D%0A%7D%0A

Add ModularExponentiation