title: Find Minimum Sum Factors Number
signature: function findMinimumSumFactorsNumber(num: number): number {
source_py: def find_minimum_sum_factors_number(num):
      sum = 0
      i = 2
      while ((i * i) <= num):
          while ((num % i) == 0):
              sum += i
              num /= i
          i += 1
      sum += num
      return sum
source_cpp: int find_minimum_sum_factors_number(int num) {
    int sum = 0;
    for ( int i = 2;
    i * i <= num;
    i ++ ) {
      while ( num % i == 0 ) {
        sum += i;
        num /= i;
      }
    }
    sum += num;
    return sum;
  }
question_info.test_list: [{"idx": 0, "outputs": 83, "inputs": {"num": 83}}, {"idx": 1, "outputs": 17.0, "inputs": {"num": 88}}, {"idx": 2, "outputs": 12.0, "inputs": {"num": 60}}, {"idx": 3, "outputs": 5.0, "inputs": {"num": 6}}, {"idx": 4, "outputs": 15.0, "inputs": {"num": 26}}, {"idx": 5, "outputs": 17.0, "inputs": {"num": 98}}, {"idx": 6, "outputs": 21.0, "inputs": {"num": 38}}, {"idx": 7, "outputs": 13.0, "inputs": {"num": 90}}, {"idx": 8, "outputs": 23.0, "inputs": {"num": 76}}, {"idx": 9, "outputs": 16.0, "inputs": {"num": 66}}]
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 Math.abs(actual - expected) < 1e-06;
  }
  
  function driver(num: number, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(num),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(83, 83.0);
    console.log(`TEST-0...${result}`);
  
    result = driver(88, 17.0);
    console.log(`TEST-1...${result}`);
  
    result = driver(60, 12.0);
    console.log(`TEST-2...${result}`);
  
    result = driver(6, 5.0);
    console.log(`TEST-3...${result}`);
  
    result = driver(26, 15.0);
    console.log(`TEST-4...${result}`);
  
    result = driver(98, 17.0);
    console.log(`TEST-5...${result}`);
  
    result = driver(38, 21.0);
    console.log(`TEST-6...${result}`);
  
    result = driver(90, 13.0);
    console.log(`TEST-7...${result}`);
  
    result = driver(76, 23.0);
    console.log(`TEST-8...${result}`);
  
    result = driver(66, 16.0);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: findMinimumSumFactorsNumber
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