title: Number Rectangles Nm Grid
signature: function numberRectanglesNmGrid($n, $m) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($n, $m, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($n, $m), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        86, 70, 
        9296385));
      
      printf("TEST-1...%s\n",driver(
        33, 65, 
        1203345));
      
      printf("TEST-2...%s\n",driver(
        3, 5, 
        90));
      
      printf("TEST-3...%s\n",driver(
        91, 12, 
        326508));
      
      printf("TEST-4...%s\n",driver(
        33, 27, 
        212058));
      
      printf("TEST-5...%s\n",driver(
        13, 75, 
        259350));
      
      printf("TEST-6...%s\n",driver(
        75, 36, 
        1898100));
      
      printf("TEST-7...%s\n",driver(
        58, 64, 
        3558880));
      
      printf("TEST-8...%s\n",driver(
        50, 51, 
        1690650));
      
      printf("TEST-9...%s\n",driver(
        4, 44, 
        9900));
      
  }
  
  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;
  }