@@ -0,0 +1,744 @@
+//2005 - #4%0A%0Aimport java.util.*;%0A%0Apublic class ThatDelicateBalance %7B%0A%0A  public static double thatFunction(double num)%7B%0A    //The function?%0A      double sum = 0.0;%0A        for(double x = 0.0; x %3C= num; x++)%7B%0A          sum += Math.pow(3.0, x);%0A        %7D%0A        return sum;%0A  %7D%0A%0A  public static void main(String%5B%5D args)%7B%0A%0A    Scanner input = new Scanner(System.in);%0A    int times = input.nextInt();%0A%0A    for(int i = 0; i %3C times; i++)%7B%0A      %0A      int initialWeight = input.nextInt();%0A      int w = initialWeight;%0A      %0A      for(int j = 0; j %3C 20; j++)%7B%0A        if((thatfunction(j) %3C Math.abs(w)) && thatfunction(j + 1) %3E Math.abs(w))%7B%0A          //We have the j we're looking for%0A          //TODO%0A        %7D%0A      %7D%0A      %0A    %7D%0A    %0A  %7D%0A   %0A%7D%0A

Create ThatDelicateBalance.java