title: Find First Natural Number Whose Factorial Divisible X
signature: function findFirstNaturalNumberWhoseFactorialDivisibleX($x) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($x, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($x), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        67, 
        66));
      
      printf("TEST-1...%s\n",driver(
        47, 
        46));
      
      printf("TEST-2...%s\n",driver(
        57, 
        19));
      
      printf("TEST-3...%s\n",driver(
        89, 
        88));
      
      printf("TEST-4...%s\n",driver(
        67, 
        66));
      
      printf("TEST-5...%s\n",driver(
        40, 
        5));
      
      printf("TEST-6...%s\n",driver(
        16, 
        6));
      
      printf("TEST-7...%s\n",driver(
        83, 
        82));
      
      printf("TEST-8...%s\n",driver(
        93, 
        31));
      
      printf("TEST-9...%s\n",driver(
        43, 
        42));
      
  }
  
  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;
  }