title: C Program Factorial Number 1
signature: fun cProgramFactorialNumber1(n: Int): Long {
source_py: def c_program_factorial_number_1(n):
      return (1 if ((n == 1) or (n == 0)) else (n * c_program_factorial_number_1((n - 1))))
source_cpp: unsigned int c_program_factorial_number_1(unsigned int n) {
    int res = 1, i;
    for ( i = 2;
    i <= n;
    i ++ ) res *= i;
    return res;
  }
question_info.test_list: [{"idx": 0, "outputs": 1307674368000, "inputs": {"n": 15}}, {"idx": 1, "outputs": 5040, "inputs": {"n": 7}}, {"idx": 2, "outputs": 20922789888000, "inputs": {"n": 16}}, {"idx": 3, "outputs": 20922789888000, "inputs": {"n": 16}}]
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:Long, expected:Long):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, expected:Long):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(15, 1307674368000)
      println("TEST-0...${result}")
      
      result = driver(7, 5040)
      println("TEST-1...${result}")
      
      result = driver(16, 20922789888000)
      println("TEST-2...${result}")
      
      result = driver(16, 20922789888000)
      println("TEST-3...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: cProgramFactorialNumber1
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn