title: Find First Natural Number Whose Factorial Divisible X
signature: function find_first_natural_number_whose_factorial_divisible_x(x)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(x, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(x), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(67, 66);
      @printf("TEST-0...%s\n",result);
      
      result = driver(47, 46);
      @printf("TEST-1...%s\n",result);
      
      result = driver(57, 19);
      @printf("TEST-2...%s\n",result);
      
      result = driver(89, 88);
      @printf("TEST-3...%s\n",result);
      
      result = driver(67, 66);
      @printf("TEST-4...%s\n",result);
      
      result = driver(40, 5);
      @printf("TEST-5...%s\n",result);
      
      result = driver(16, 6);
      @printf("TEST-6...%s\n",result);
      
      result = driver(83, 82);
      @printf("TEST-7...%s\n",result);
      
      result = driver(93, 31);
      @printf("TEST-8...%s\n",result);
      
      result = driver(43, 42);
      @printf("TEST-9...%s\n",result);
      
  end
  
  main()
source_py: def find_first_natural_number_whose_factorial_divisible_x(x):
      i = 1
      fact = 1
      for i in range(1, x):
          fact = (fact * i)
          if ((fact % x) == 0):
              break
      return i
source_cpp: int find_first_natural_number_whose_factorial_divisible_x(int x) {
    int i = 1;
    int fact = 1;
    for ( i = 1;
    i < x;
    i ++ ) {
      fact = fact * i;
      if ( fact % x == 0 ) break;
    }
    return i;
  }