title: Hardy Ramanujan Theorem
signature: fun hardyRamanujanTheorem(n: Int): Int {
source_py: def hardy_ramanujan_theorem(n):
      count = 0
      if ((n % 2) == 0):
          count = (count + 1)
          while ((n % 2) == 0):
              n = int((n / 2))
      i = 3
      while (i <= int(math.sqrt(n))):
          if ((n % i) == 0):
              count = (count + 1)
              while ((n % i) == 0):
                  n = int((n / i))
          i = (i + 2)
      if (n > 2):
          count = (count + 1)
      return count
source_cpp: int hardy_ramanujan_theorem(int n) {
    int count = 0;
    if ( n % 2 == 0 ) {
      count ++;
      while ( n % 2 == 0 ) n = n / 2;
    }
    for ( int i = 3;
    i <= sqrt ( n );
    i = i + 2 ) {
      if ( n % i == 0 ) {
        count ++;
        while ( n % i == 0 ) n = n / i;
      }
    }
    if ( n > 2 ) count ++;
    return count;
  }
question_info.test_list: [{"idx": 0, "outputs": 2, "inputs": {"n": 99}}, {"idx": 1, "outputs": 2, "inputs": {"n": 33}}, {"idx": 2, "outputs": 2, "inputs": {"n": 50}}, {"idx": 3, "outputs": 1, "inputs": {"n": 17}}, {"idx": 4, "outputs": 2, "inputs": {"n": 18}}, {"idx": 5, "outputs": 2, "inputs": {"n": 69}}, {"idx": 6, "outputs": 1, "inputs": {"n": 23}}, {"idx": 7, "outputs": 2, "inputs": {"n": 18}}, {"idx": 8, "outputs": 2, "inputs": {"n": 94}}, {"idx": 9, "outputs": 1, "inputs": {"n": 16}}]
question_info.extension: kts
question_info.test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(99, 2)
      println("TEST-0...${result}")
      
      result = driver(33, 2)
      println("TEST-1...${result}")
      
      result = driver(50, 2)
      println("TEST-2...${result}")
      
      result = driver(17, 1)
      println("TEST-3...${result}")
      
      result = driver(18, 2)
      println("TEST-4...${result}")
      
      result = driver(69, 2)
      println("TEST-5...${result}")
      
      result = driver(23, 1)
      println("TEST-6...${result}")
      
      result = driver(18, 2)
      println("TEST-7...${result}")
      
      result = driver(94, 2)
      println("TEST-8...${result}")
      
      result = driver(16, 1)
      println("TEST-9...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: hardyRamanujanTheorem
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn