title: Number Rectangles Nm Grid
signature: func numberRectanglesNmGrid(n int, m int) int {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual int, expected int) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(n int, m int, expected int) string {
      if validateSolution(PLACEHOLDER_FN_NAME(n, m),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(86, 
  	70, 9296385)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(33, 
  	65, 1203345)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(3, 
  	5, 90)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(91, 
  	12, 326508)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(33, 
  	27, 212058)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(13, 
  	75, 259350)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(75, 
  	36, 1898100)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(58, 
  	64, 3558880)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(50, 
  	51, 1690650)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(4, 
  	44, 9900)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
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;
  }