title: Number Rectangles Nm Grid
signature: class Solution {
  
      public Integer numberRectanglesNmGrid(Integer n, Integer m) {
test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer n, Integer m, Integer expected){
          try{
              Driver driver = new Driver();
              if (driver.run(n, m,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(86, 70, 9296385);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(33, 65, 1203345);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(3, 5, 90);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(91, 12, 326508);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(33, 27, 212058);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(13, 75, 259350);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(75, 36, 1898100);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(58, 64, 3558880);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(50, 51, 1690650);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(4, 44, 9900);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer n, Integer m, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(n, m),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
source_py: def number_rectangles_nm_grid(n, m):
      return ((((m * n) * (n + 1)) * (m + 1)) // 4)
source_cpp: int number_rectangles_nm_grid(int n, int m) {
    return ( m * n * ( n + 1 ) * ( m + 1 ) ) / 4;
  }