title: Find Value Of Y Mod 2 Raised To Power X
signature: function findValueOfYMod2RaisedToPowerX($y, $x) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($y, $x, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($y, $x), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        57, 76, 
        57));
      
      printf("TEST-1...%s\n",driver(
        80, 46, 
        80));
      
      printf("TEST-2...%s\n",driver(
        84, 96, 
        84));
      
      printf("TEST-3...%s\n",driver(
        35, 16, 
        35));
      
      printf("TEST-4...%s\n",driver(
        3, 84, 
        3));
      
      printf("TEST-5...%s\n",driver(
        42, 79, 
        42));
      
      printf("TEST-6...%s\n",driver(
        7, 2, 
        3));
      
      printf("TEST-7...%s\n",driver(
        99, 83, 
        99));
      
      printf("TEST-8...%s\n",driver(
        13, 61, 
        13));
      
      printf("TEST-9...%s\n",driver(
        44, 8, 
        44));
      
  }
  
  main();
  ?>
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 ) );
  }