@@ -0,0 +1,857 @@
+import java.util.*;%0Aimport java.lang.*;%0Aimport java.io.*;%0Aimport java.math.*;%0A%0Aclass Ideone%0A%7B%0A%09public static void main (String%5B%5D args) throws java.lang.Exception%0A%09%7B%0A%09%09BigInteger a,b,m,n;%0A%09%09int t; BigInteger two = new BigInteger(%222%22);%0A%09%09BigInteger zero = new BigInteger(%220%22);%0A%09%09Scanner s = new Scanner(System.in);%0A%09%09t = Integer.parseInt(s.nextLine());%0A%09%09while(t-- %3E 0) %7B%0A%09%09%09String%5B%5D in = s.nextLine().split(%22 %22);%0A%09%09%09a = new BigInteger(in%5B0%5D);%0A%09%09%09b = new BigInteger(in%5B1%5D);%0A%09%09%09if(a.divideAndRemainder(two)%5B1%5D == zero) %0A%09%09%09%09m = a.divide(two);%0A%09%09%09else%0A%09%09%09%09m = (a.add(BigInteger.ONE)).divide(two);%0A%09%09%09if(b.divideAndRemainder(two)%5B1%5D == zero) %0A%09%09%09%09n = b.divide(two);%0A%09%09%09else%0A%09%09%09%09n = (b.add(BigInteger.ONE)).divide(two);%0A%09%09%09a = a.multiply(n);%0A%09%09%09b = b.multiply(m);%0A%09%09%09if( a.compareTo(b) == 1)%0A%09%09%09%09System.out.println(a);%0A%09%09%09else%0A%09%09%09%09System.out.println(b);%0A%09%09%7D%0A%09%7D%0A%7D%0A

Create soldiers.java