title: Find Last Digit Factorial Divides Factorial B
signature: class Solution {
  
      public Integer findLastDigitFactorialDividesFactorialB(Integer a, Integer b) {
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.extension: java
question_info.entry_fn_name: findLastDigitFactorialDividesFactorialB
question_info.entry_cls_name: Solution
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.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer a, Integer b, Integer expected){
          try{
              Driver driver = new Driver();
              if (driver.run(a, b,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(79, 84, 0);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(61, 29, 1);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(39, 77, 0);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(39, 65, 0);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(61, 78, 0);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(86, 73, 1);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(7, 92, 0);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(86, 50, 1);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(86, 63, 1);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(11, 2, 1);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer a, Integer b, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(a, b),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__