title: Number Rectangles Nm Grid
signature: function numberRectanglesNmGrid(n: number, m: number): number {
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;
  }
question_info.test_list: [{"idx": 0, "outputs": 9296385, "inputs": {"n": 86, "m": 70}}, {"idx": 1, "outputs": 1203345, "inputs": {"n": 33, "m": 65}}, {"idx": 2, "outputs": 90, "inputs": {"n": 3, "m": 5}}, {"idx": 3, "outputs": 326508, "inputs": {"n": 91, "m": 12}}, {"idx": 4, "outputs": 212058, "inputs": {"n": 33, "m": 27}}, {"idx": 5, "outputs": 259350, "inputs": {"n": 13, "m": 75}}, {"idx": 6, "outputs": 1898100, "inputs": {"n": 75, "m": 36}}, {"idx": 7, "outputs": 3558880, "inputs": {"n": 58, "m": 64}}, {"idx": 8, "outputs": 1690650, "inputs": {"n": 50, "m": 51}}, {"idx": 9, "outputs": 9900, "inputs": {"n": 4, "m": 44}}]
question_info.entry_cls_name: Solution
question_info.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();
question_info.extension: ts
question_info.entry_fn_name: numberRectanglesNmGrid
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js