title: Number Rectangles Nm Grid
signature: number_rectangles_nm_grid <- function(n, m) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, m, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n, m), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          86L, 70L, 
          9296385L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          33L, 65L, 
          1203345L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          3L, 5L, 
          90L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          91L, 12L, 
          326508L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          33L, 27L, 
          212058L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          13L, 75L, 
          259350L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          75L, 36L, 
          1898100L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          58L, 64L, 
          3558880L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          50L, 51L, 
          1690650L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          4L, 44L, 
          9900L
      )))
  
  }
  
  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;
  }