title: Find Value Of Y Mod 2 Raised To Power X
signature: def findValueOfYMod2RaisedToPowerX(y: Int, x: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(y: Int, x: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(y, x),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        57, 76, 
        57    
      )}")   
  
  
      println(s"TEST-1...${driver(
        80, 46, 
        80    
      )}")   
  
  
      println(s"TEST-2...${driver(
        84, 96, 
        84    
      )}")   
  
  
      println(s"TEST-3...${driver(
        35, 16, 
        35    
      )}")   
  
  
      println(s"TEST-4...${driver(
        3, 84, 
        3    
      )}")   
  
  
      println(s"TEST-5...${driver(
        42, 79, 
        42    
      )}")   
  
  
      println(s"TEST-6...${driver(
        7, 2, 
        3    
      )}")   
  
  
      println(s"TEST-7...${driver(
        99, 83, 
        99    
      )}")   
  
  
      println(s"TEST-8...${driver(
        13, 61, 
        13    
      )}")   
  
  
      println(s"TEST-9...${driver(
        44, 8, 
        44    
      )}")   
  
  }
  
source_py: def find_value_of_y_mod_2_raised_to_power_x(y, x):
      return (y % pow(2, x))
source_cpp: long long int find_value_of_y_mod_2_raised_to_power_x(long long int y, long long int x) {
    if ( log2 ( y ) < x ) return y;
    if ( x > 63 ) return y;
    return ( y % ( 1 << x ) );
  }