title: Sum Factors Number
signature: function sumFactorsNumber($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(
        76, 
        140));
      
      printf("TEST-1...%s\n",driver(
        21, 
        32));
      
      printf("TEST-2...%s\n",driver(
        4, 
        7));
      
      printf("TEST-3...%s\n",driver(
        49, 
        57));
      
      printf("TEST-4...%s\n",driver(
        35, 
        48));
      
      printf("TEST-5...%s\n",driver(
        55, 
        72));
      
      printf("TEST-6...%s\n",driver(
        43, 
        44));
      
      printf("TEST-7...%s\n",driver(
        39, 
        56));
      
      printf("TEST-8...%s\n",driver(
        36, 
        91));
      
      printf("TEST-9...%s\n",driver(
        5, 
        6));
      
  }
  
  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 );
  }