title: Sum Matrix Element Absolute Difference Row Column Numbers
signature: function sumMatrixElementAbsoluteDifferenceRowColumnNumbers($n) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($n, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($n), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        60, 
        71980));
      
      printf("TEST-1...%s\n",driver(
        44, 
        28380));
      
      printf("TEST-2...%s\n",driver(
        72, 
        124392));
      
      printf("TEST-3...%s\n",driver(
        90, 
        242970));
      
      printf("TEST-4...%s\n",driver(
        99, 
        323400));
      
      printf("TEST-5...%s\n",driver(
        45, 
        30360));
      
      printf("TEST-6...%s\n",driver(
        27, 
        6552));
      
      printf("TEST-7...%s\n",driver(
        11, 
        440));
      
      printf("TEST-8...%s\n",driver(
        65, 
        91520));
      
      printf("TEST-9...%s\n",driver(
        52, 
        46852));
      
  }
  
  main();
  ?>
source_py: def sum_matrix_element_absolute_difference_row_column_numbers(n):
      arr = [[0 for x in range(n)] for y in range(n)]
      for i in range(n):
          for j in range(n):
              arr[i][j] = abs((i - j))
      sum = 0
      for i in range(n):
          for j in range(n):
              sum += arr[i][j]
      return sum
source_cpp: int sum_matrix_element_absolute_difference_row_column_numbers(int n) {
    int arr [ n ] [ n ];
    for ( int i = 0;
    i < n;
    i ++ ) for ( int j = 0;
    j < n;
    j ++ ) arr [ i ] [ j ] = abs ( i - j );
    int sum = 0;
    for ( int i = 0;
    i < n;
    i ++ ) for ( int j = 0;
    j < n;
    j ++ ) sum += arr [ i ] [ j ];
    return sum;
  }