title: Sum Factors Number
signature: sum_factors_number <- 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(
          76L, 
          140L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          21L, 
          32L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          4L, 
          7L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          49L, 
          57L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          35L, 
          48L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          55L, 
          72L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          43L, 
          44L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          39L, 
          56L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          36L, 
          91L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          5L, 
          6L
      )))
  
  }
  
  main()
source_py: def sum_factors_number(n):
      result = 0
      for i in range(2, (int(math.sqrt(n)) + 1)):
          if ((n % i) == 0):
              if (i == (n / i)):
                  result = (result + i)
              else:
                  result = (result + (i + (n // i)))
      return ((result + n) + 1)
source_cpp: int sum_factors_number(int n) {
    int result = 0;
    for ( int i = 2;
    i <= sqrt ( n );
    i ++ ) {
      if ( n % i == 0 ) {
        if ( i == ( n / i ) ) result += i;
        else result += ( i + n / i );
      }
    }
    return ( result + n + 1 );
  }