title: Find Last Digit Factorial Divides Factorial B
signature: fun findLastDigitFactorialDividesFactorialB(a: Int, b: Int): Int {
source_py: def find_last_digit_factorial_divides_factorial_b(A, B):
      variable = 1
      if (A == B):
          return 1
      elif ((B - A) >= 5):
          return 0
      else:
          for i in range((A + 1), (B + 1)):
              variable = ((variable * (i % 10)) % 10)
          return (variable % 10)
source_cpp: int find_last_digit_factorial_divides_factorial_b(long long int A, long long int B) {
    int variable = 1;
    if ( A == B ) return 1;
    else if ( ( B - A ) >= 5 ) return 0;
    else {
      for ( long long int i = A + 1;
      i <= B;
      i ++ ) variable = ( variable * ( i % 10 ) ) % 10;
      return variable % 10;
    }
  }
question_info.test_list: [{"idx": 0, "outputs": 0, "inputs": {"a": 79, "b": 84}}, {"idx": 1, "outputs": 1, "inputs": {"a": 61, "b": 29}}, {"idx": 2, "outputs": 0, "inputs": {"a": 39, "b": 77}}, {"idx": 3, "outputs": 0, "inputs": {"a": 39, "b": 65}}, {"idx": 4, "outputs": 0, "inputs": {"a": 61, "b": 78}}, {"idx": 5, "outputs": 1, "inputs": {"a": 86, "b": 73}}, {"idx": 6, "outputs": 0, "inputs": {"a": 7, "b": 92}}, {"idx": 7, "outputs": 1, "inputs": {"a": 86, "b": 50}}, {"idx": 8, "outputs": 1, "inputs": {"a": 86, "b": 63}}, {"idx": 9, "outputs": 1, "inputs": {"a": 11, "b": 2}}]
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(a: Int, b: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(a, b), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(79, 84, 0)
      println("TEST-0...${result}")
      
      result = driver(61, 29, 1)
      println("TEST-1...${result}")
      
      result = driver(39, 77, 0)
      println("TEST-2...${result}")
      
      result = driver(39, 65, 0)
      println("TEST-3...${result}")
      
      result = driver(61, 78, 0)
      println("TEST-4...${result}")
      
      result = driver(86, 73, 1)
      println("TEST-5...${result}")
      
      result = driver(7, 92, 0)
      println("TEST-6...${result}")
      
      result = driver(86, 50, 1)
      println("TEST-7...${result}")
      
      result = driver(86, 63, 1)
      println("TEST-8...${result}")
      
      result = driver(11, 2, 1)
      println("TEST-9...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: findLastDigitFactorialDividesFactorialB
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn