title: Find Minimum Number Divided Make Number Perfect Square
signature: fun findMinimumNumberDividedMakeNumberPerfectSquare(n: Int): Int {
source_py: def find_minimum_number_divided_make_number_perfect_square(n):
      count = 0
      ans = 1
      while ((n % 2) == 0):
          count += 1
          n //= 2
      if ((count % 2) is not 0):
          ans *= 2
      for i in range(3, (int(math.sqrt(n)) + 1), 2):
          count = 0
          while ((n % i) == 0):
              count += 1
              n //= i
          if ((count % 2) is not 0):
              ans *= i
      if (n > 2):
          ans *= n
      return ans
source_cpp: int find_minimum_number_divided_make_number_perfect_square(int n) {
    int count = 0, ans = 1;
    while ( n % 2 == 0 ) {
      count ++;
      n /= 2;
    }
    if ( count % 2 ) ans *= 2;
    for ( int i = 3;
    i <= sqrt ( n );
    i += 2 ) {
      count = 0;
      while ( n % i == 0 ) {
        count ++;
        n /= i;
      }
      if ( count % 2 ) ans *= i;
    }
    if ( n > 2 ) ans *= n;
    return ans;
  }
question_info.test_list: [{"idx": 0, "outputs": 95, "inputs": {"n": 95}}, {"idx": 1, "outputs": 3, "inputs": {"n": 48}}, {"idx": 2, "outputs": 3, "inputs": {"n": 3}}, {"idx": 3, "outputs": 10, "inputs": {"n": 10}}, {"idx": 4, "outputs": 82, "inputs": {"n": 82}}, {"idx": 5, "outputs": 1, "inputs": {"n": 1}}, {"idx": 6, "outputs": 77, "inputs": {"n": 77}}, {"idx": 7, "outputs": 11, "inputs": {"n": 99}}, {"idx": 8, "outputs": 23, "inputs": {"n": 23}}, {"idx": 9, "outputs": 61, "inputs": {"n": 61}}]
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(95, 95)
      println("TEST-0...${result}")
      
      result = driver(48, 3)
      println("TEST-1...${result}")
      
      result = driver(3, 3)
      println("TEST-2...${result}")
      
      result = driver(10, 10)
      println("TEST-3...${result}")
      
      result = driver(82, 82)
      println("TEST-4...${result}")
      
      result = driver(1, 1)
      println("TEST-5...${result}")
      
      result = driver(77, 77)
      println("TEST-6...${result}")
      
      result = driver(99, 11)
      println("TEST-7...${result}")
      
      result = driver(23, 23)
      println("TEST-8...${result}")
      
      result = driver(61, 61)
      println("TEST-9...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: findMinimumNumberDividedMakeNumberPerfectSquare
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