@@ -0,0 +1,403 @@
+package java_problems.beginner;%0A%0Aimport java.util.Scanner;%0A%0Apublic class FitSquaresInTriangle %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09%0A%09%09Scanner sc = new Scanner(System.in);%0A%09%09int numCases = Integer.parseInt(sc.nextLine());%0A%09%09for (int i = 0; i %3C numCases; i++) %7B%0A%09%09%09int lengthOfBase = sc.nextInt();%0A%09%09%09int n = (lengthOfBase / 2) - 1;%0A%09%09%09System.out.println((n*(n + 1)) / 2);%0A%09%09%7D%0A%09%09sc.close();%0A%09%7D%0A%7D

Add FitSquaresInTriangle