title: Find Unit Digit X Raised Power Y
signature: pub fn find_unit_digit_x_raised_power_y(x: i32, y: 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(x: i32, y: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(x, y), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        33, 55, 
        7
      ));
      
      println!("TEST-1...{}", driver(
        95, 7, 
        5
      ));
      
      println!("TEST-2...{}", driver(
        21, 63, 
        1
      ));
      
      println!("TEST-3...{}", driver(
        3, 62, 
        9
      ));
      
      println!("TEST-4...{}", driver(
        40, 53, 
        0
      ));
      
      println!("TEST-5...{}", driver(
        64, 24, 
        6
      ));
      
      println!("TEST-6...{}", driver(
        17, 23, 
        3
      ));
      
      println!("TEST-7...{}", driver(
        58, 74, 
        4
      ));
      
      println!("TEST-8...{}", driver(
        44, 13, 
        4
      ));
      
      println!("TEST-9...{}", driver(
        27, 54, 
        9
      ));
      
  }
source_py: def find_unit_digit_x_raised_power_y(x, y):
      res = 1
      for i in range(y):
          res = ((res * x) % 10)
      return res
source_cpp: int find_unit_digit_x_raised_power_y(int x, int y) {
    int res = 1;
    for ( int i = 0;
    i < y;
    i ++ ) res = ( res * x ) % 10;
    return res;
  }