title: C Program Factorial Number
signature: fun cProgramFactorialNumber(n: Int): Int {
source_py: def c_program_factorial_number(n):
      return (1 if ((n == 1) or (n == 0)) else (n * c_program_factorial_number((n - 1))))
source_cpp: unsigned int c_program_factorial_number(unsigned int n) {
    if ( n == 0 ) return 1;
    return n * c_program_factorial_number ( n - 1 );
  }
question_info.test_list: [{"idx": 0, "outputs": 120, "inputs": {"n": 5}}, {"idx": 1, "outputs": 479001600, "inputs": {"n": 12}}]
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:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, expected:Int):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(5, 120)
      println("TEST-0...${result}")
      
      result = driver(12, 479001600)
      println("TEST-1...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: cProgramFactorialNumber
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn