XOR Exponents by rotary-o

import java.util.*;enum M{M;System z;{for(Scanner s=new Scanner(z.in);z==z;){String[]a=s.next().split("\\^");long l=0;for(int i=0,j=a.length;i<j;)l^=new java.math.BigInteger(a[i++]).pow(i<j?new Integer(a[i++]):1).longValue();z.out.println(l);}}}

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

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)


return to the top page