title: Number Rectangles Nm Grid
signature: function numberRectanglesNmGrid(n: number, m: number): number {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: number, expected: number): boolean {
      return convertToString(actual) === convertToString(expected);
  }
  
  function driver(n: number, m: number, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(n, m),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(86, 70, 9296385);
    console.log(`TEST-0...${result}`);
  
    result = driver(33, 65, 1203345);
    console.log(`TEST-1...${result}`);
  
    result = driver(3, 5, 90);
    console.log(`TEST-2...${result}`);
  
    result = driver(91, 12, 326508);
    console.log(`TEST-3...${result}`);
  
    result = driver(33, 27, 212058);
    console.log(`TEST-4...${result}`);
  
    result = driver(13, 75, 259350);
    console.log(`TEST-5...${result}`);
  
    result = driver(75, 36, 1898100);
    console.log(`TEST-6...${result}`);
  
    result = driver(58, 64, 3558880);
    console.log(`TEST-7...${result}`);
  
    result = driver(50, 51, 1690650);
    console.log(`TEST-8...${result}`);
  
    result = driver(4, 44, 9900);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
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;
  }