title: Find First Natural Number Whose Factorial Divisible X
signature: class Solution {
  
      public Integer findFirstNaturalNumberWhoseFactorialDivisibleX(Integer x) {
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;
  }
question_info.extension: java
question_info.entry_fn_name: findFirstNaturalNumberWhoseFactorialDivisibleX
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 66, "inputs": {"x": 67}}, {"idx": 1, "outputs": 46, "inputs": {"x": 47}}, {"idx": 2, "outputs": 19, "inputs": {"x": 57}}, {"idx": 3, "outputs": 88, "inputs": {"x": 89}}, {"idx": 4, "outputs": 66, "inputs": {"x": 67}}, {"idx": 5, "outputs": 5, "inputs": {"x": 40}}, {"idx": 6, "outputs": 6, "inputs": {"x": 16}}, {"idx": 7, "outputs": 82, "inputs": {"x": 83}}, {"idx": 8, "outputs": 31, "inputs": {"x": 93}}, {"idx": 9, "outputs": 42, "inputs": {"x": 43}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer x, Integer expected){
          try{
              Driver driver = new Driver();
              if (driver.run(x,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(67, 66);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(47, 46);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(57, 19);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(89, 88);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(67, 66);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(40, 5);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(16, 6);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(83, 82);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(93, 31);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(43, 42);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer x, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(x),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__