@@ -0,0 +1,1156 @@
+package GameTheory;%0A%0Aimport java.io.*;%0Aimport java.util.*;%0A%0Apublic class TowerBeaker %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        /* Enter your code here. Read input from STDIN. Print output to STDOUT. %0A         * Your class should be named Solution. */%0A        Scanner scan = new Scanner(System.in);%0A        int games = scan.nextInt();%0A        while(games--%3E=0)%7B%0A            int tower = scan.nextInt();%0A            int result = 0;%0A            for (int i = 0; i %3C tower; i++)%7B%0A                int level = scan.nextInt();%0A                result %5E= totalPrimes(level);%0A            %7D%0A            if(result ==0)%7B%0A                System.out.println(2);%0A            %7D else %7B%0A                System.out.println(1);%0A            %7D%0A        %7D%0A        scan.nextInt();%0A    %7D%0A    %0A    private static int totalPrimes (int i)%7B%0A        if(i == 0 %7C%7C i == 1)%7B%0A            return 0;%0A        %7D%0A        if(i%252 == 0)%7B%0A            return (1 + totalPrimes(i/2));%0A        %7D else %7B%0A            for(int j = 3; j*j %3C= i; j+=2)%7B%0A                if(i%25j==0)%7B%0A                    return (1 + totalPrimes(i/j));%0A                %7D%0A            %7D%0A        %7D%0A        return 1;%0A    %7D%0A%7D

add towerbeaker code