title: Find Last Digit Factorial Divides Factorial B
signature: pub fn find_last_digit_factorial_divides_factorial_b(a: i32, b: i32) -> i32 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: i32, expected: i32)->bool{
  return actual==expected
  }
  pub fn driver(a: i32, b: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(a, b), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        79, 84, 
        0
      ));
      
      println!("TEST-1...{}", driver(
        61, 29, 
        1
      ));
      
      println!("TEST-2...{}", driver(
        39, 77, 
        0
      ));
      
      println!("TEST-3...{}", driver(
        39, 65, 
        0
      ));
      
      println!("TEST-4...{}", driver(
        61, 78, 
        0
      ));
      
      println!("TEST-5...{}", driver(
        86, 73, 
        1
      ));
      
      println!("TEST-6...{}", driver(
        7, 92, 
        0
      ));
      
      println!("TEST-7...{}", driver(
        86, 50, 
        1
      ));
      
      println!("TEST-8...{}", driver(
        86, 63, 
        1
      ));
      
      println!("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;
    }
  }