title: Sum Matrix Element Absolute Difference Row Column Numbers
signature: sum_matrix_element_absolute_difference_row_column_numbers <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          60L, 
          71980L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          44L, 
          28380L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          72L, 
          124392L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          90L, 
          242970L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          99L, 
          323400L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          45L, 
          30360L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          27L, 
          6552L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          11L, 
          440L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          65L, 
          91520L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          52L, 
          46852L
      )))
  
  }
  
  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;
  }