title: Find Unit Digit X Raised Power Y
signature: find_unit_digit_x_raised_power_y <- function(x, y) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(x, y, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(x, y), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          33L, 55L, 
          7L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          95L, 7L, 
          5L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          21L, 63L, 
          1L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          3L, 62L, 
          9L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          40L, 53L, 
          0L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          64L, 24L, 
          6L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          17L, 23L, 
          3L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          58L, 74L, 
          4L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          44L, 13L, 
          4L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          27L, 54L, 
          9L
      )))
  
  }
  
  main()
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;
  }