title: Find Last Digit Factorial Divides Factorial B
signature: findLastDigitFactorialDividesFactorialB(a, b) {
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(a, b, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(a, b), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          79, 84, 
          0)
      }");
  
      print("TEST-1...${driver(
          61, 29, 
          1)
      }");
  
      print("TEST-2...${driver(
          39, 77, 
          0)
      }");
  
      print("TEST-3...${driver(
          39, 65, 
          0)
      }");
  
      print("TEST-4...${driver(
          61, 78, 
          0)
      }");
  
      print("TEST-5...${driver(
          86, 73, 
          1)
      }");
  
      print("TEST-6...${driver(
          7, 92, 
          0)
      }");
  
      print("TEST-7...${driver(
          86, 50, 
          1)
      }");
  
      print("TEST-8...${driver(
          86, 63, 
          1)
      }");
  
      print("TEST-9...${driver(
          11, 2, 
          1)
      }");
  
      return 0;
  }
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;
    }
  }