title: Find Unit Digit X Raised Power Y 1
signature: pub fn find_unit_digit_x_raised_power_y_1(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(
        37, 17, 
        7
      ));
      
      println!("TEST-1...{}", driver(
        70, 52, 
        0
      ));
      
      println!("TEST-2...{}", driver(
        26, 23, 
        6
      ));
      
      println!("TEST-3...{}", driver(
        9, 96, 
        1
      ));
      
      println!("TEST-4...{}", driver(
        82, 71, 
        8
      ));
      
      println!("TEST-5...{}", driver(
        95, 36, 
        5
      ));
      
      println!("TEST-6...{}", driver(
        43, 40, 
        1
      ));
      
      println!("TEST-7...{}", driver(
        7, 27, 
        3
      ));
      
      println!("TEST-8...{}", driver(
        19, 56, 
        1
      ));
      
      println!("TEST-9...{}", driver(
        49, 28, 
        1
      ));
      
  }
source_py: def find_unit_digit_x_raised_power_y_1(x, y):
      x = (x % 10)
      if (y != 0):
          y = ((y % 4) + 4)
      return (int(math.pow(x, y)) % 10)
source_cpp: int find_unit_digit_x_raised_power_y_1(int x, int y) {
    x = x % 10;
    if ( y != 0 ) y = y % 4 + 4;
    return ( ( ( int ) ( pow ( x, y ) ) ) % 10 );
  }