Modular Exponentiation 2 by nn

import java.util.*;class X{static{for(Scanner s=new Scanner(System.in);s==s;)System.out.println(s.nextBigInteger().modPow(s.nextBigInteger(),s.nextBigInteger()));}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page