title: Find First Natural Number Whose Factorial Divisible X
signature: findFirstNaturalNumberWhoseFactorialDivisibleX(x) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(x, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(x), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          67, 
          66)
      }");
  
      print("TEST-1...${driver(
          47, 
          46)
      }");
  
      print("TEST-2...${driver(
          57, 
          19)
      }");
  
      print("TEST-3...${driver(
          89, 
          88)
      }");
  
      print("TEST-4...${driver(
          67, 
          66)
      }");
  
      print("TEST-5...${driver(
          40, 
          5)
      }");
  
      print("TEST-6...${driver(
          16, 
          6)
      }");
  
      print("TEST-7...${driver(
          83, 
          82)
      }");
  
      print("TEST-8...${driver(
          93, 
          31)
      }");
  
      print("TEST-9...${driver(
          43, 
          42)
      }");
  
      return 0;
  }
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;
  }