@@ -0,0 +1,581 @@
+package java_problems.easy;%0D%0A%0D%0Aimport java.util.Scanner;%0D%0A%0D%0Apublic class TheBestBox %7B%0D%0A%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%09%09%0D%0A%09%09Scanner sc = new Scanner(System.in);%0D%0A%09%09int numCases = Integer.parseInt(sc.nextLine());%0D%0A%09%09for (int i = 0; i %3C numCases; i++) %7B%0D%0A%09%09%09double p = sc.nextDouble();%0D%0A%09%09%09double s = sc.nextDouble();%0D%0A%09%09%09double length = 0;%0D%0A%09%09%09double height = 0;%0D%0A%09%09%09double base = 0;%0D%0A%09%09%09base = (p - Math.sqrt((p*p) - 24*s)) / 12;%0D%0A%09%09%09height = base;%0D%0A%09%09%09length = ((p/4) - (2*base));%0D%0A%09%09%09System.out.printf(%22%25.2f%25n%22, (length * base * height));%0D%0A%09%09%7D%0D%0A%09%09sc.close();%0D%0A%09%7D%0D%0A%7D

Add TheBestBox