title: Find Last Digit Factorial Divides Factorial B
signature: function find_last_digit_factorial_divides_factorial_b(a, b)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(a, b, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(a, b), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(79, 84, 0);
      @printf("TEST-0...%s\n",result);
      
      result = driver(61, 29, 1);
      @printf("TEST-1...%s\n",result);
      
      result = driver(39, 77, 0);
      @printf("TEST-2...%s\n",result);
      
      result = driver(39, 65, 0);
      @printf("TEST-3...%s\n",result);
      
      result = driver(61, 78, 0);
      @printf("TEST-4...%s\n",result);
      
      result = driver(86, 73, 1);
      @printf("TEST-5...%s\n",result);
      
      result = driver(7, 92, 0);
      @printf("TEST-6...%s\n",result);
      
      result = driver(86, 50, 1);
      @printf("TEST-7...%s\n",result);
      
      result = driver(86, 63, 1);
      @printf("TEST-8...%s\n",result);
      
      result = driver(11, 2, 1);
      @printf("TEST-9...%s\n",result);
      
  end
  
  main()
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;
    }
  }