title: Find Value Of Y Mod 2 Raised To Power X
signature: int findValueOfYMod2RaisedToPowerX(int y, int x) {
test_code: #include <algorithm>
  #include <assert.h>
  #include <cstdlib>
  #include <iostream>
  #include <map>
  #include <set>
  #include <string>
  #include <tuple> 
  #include <unordered_map>
  #include <vector>
  #include <math.h>
  #include <cmath>
  #include <bits/stdc++.h>
  #include <numeric>
  #include <functional>
  
  using namespace std;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual == expected;
  }
  
  string driver(int y, int x, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(y, x), expected)){
              return "PASSED";
          }
          return "FAILED";
      }
      catch (const std::overflow_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::runtime_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::exception& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (...)
      {
          return "UNK_ERROR";
      }
  }
  
  int main() {
      string result = "";
  
      result = driver(57, 76, 57); 
      cout << "TEST-" << 0 << "..."
           <<  result
           << "\n";
  
      result = driver(80, 46, 80); 
      cout << "TEST-" << 1 << "..."
           <<  result
           << "\n";
  
      result = driver(84, 96, 84); 
      cout << "TEST-" << 2 << "..."
           <<  result
           << "\n";
  
      result = driver(35, 16, 35); 
      cout << "TEST-" << 3 << "..."
           <<  result
           << "\n";
  
      result = driver(3, 84, 3); 
      cout << "TEST-" << 4 << "..."
           <<  result
           << "\n";
  
      result = driver(42, 79, 42); 
      cout << "TEST-" << 5 << "..."
           <<  result
           << "\n";
  
      result = driver(7, 2, 3); 
      cout << "TEST-" << 6 << "..."
           <<  result
           << "\n";
  
      result = driver(99, 83, 99); 
      cout << "TEST-" << 7 << "..."
           <<  result
           << "\n";
  
      result = driver(13, 61, 13); 
      cout << "TEST-" << 8 << "..."
           <<  result
           << "\n";
  
      result = driver(44, 8, 44); 
      cout << "TEST-" << 9 << "..."
           <<  result
           << "\n";
  
      return 0;
  }
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 ) );
  }