@@ -0,0 +1,594 @@
+import java.io.*;%0Aimport java.util.Scanner;%0Aclass UtopianTree%7B%0A    public static int calculateHeight(int n)%7B%0A       int h=1,l=n/2;%0A        Boolean isOdd=false;%0A        if(n%252!=0)isOdd=true;%0A        while(l!=0)%7B%0A            h=2*h;%0A            h+=1;%0A            l--;%0A        %7D%0A        if(isOdd) h=2*h;%0A        return h;%0A    %7D%0A    public static void main(String args%5B%5D)%7B%0A        Scanner scanner=new Scanner(System.in);%0A        int testcases=scanner.nextInt();%0A        for(int i=0;i%3Ctestcases;i++)%0A        %7Bint input=scanner.nextInt();%0A         System.out.println(calculateHeight(input));%7D%0A    %7D%0A%7D%0A

Create UtopianTree.java