title: Find Last Digit Factorial Divides Factorial B
signature: def findLastDigitFactorialDividesFactorialB(a: Int, b: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(a: Int, b: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(a, b),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        79, 84, 
        0    
      )}")   
  
  
      println(s"TEST-1...${driver(
        61, 29, 
        1    
      )}")   
  
  
      println(s"TEST-2...${driver(
        39, 77, 
        0    
      )}")   
  
  
      println(s"TEST-3...${driver(
        39, 65, 
        0    
      )}")   
  
  
      println(s"TEST-4...${driver(
        61, 78, 
        0    
      )}")   
  
  
      println(s"TEST-5...${driver(
        86, 73, 
        1    
      )}")   
  
  
      println(s"TEST-6...${driver(
        7, 92, 
        0    
      )}")   
  
  
      println(s"TEST-7...${driver(
        86, 50, 
        1    
      )}")   
  
  
      println(s"TEST-8...${driver(
        86, 63, 
        1    
      )}")   
  
  
      println(s"TEST-9...${driver(
        11, 2, 
        1    
      )}")   
  
  }
  
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;
    }
  }