title: Find Value Of Y Mod 2 Raised To Power X
signature: function find_value_of_y_mod_2_raised_to_power_x(y, x)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(y, x, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(y, x), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(57, 76, 57);
      @printf("TEST-0...%s\n",result);
      
      result = driver(80, 46, 80);
      @printf("TEST-1...%s\n",result);
      
      result = driver(84, 96, 84);
      @printf("TEST-2...%s\n",result);
      
      result = driver(35, 16, 35);
      @printf("TEST-3...%s\n",result);
      
      result = driver(3, 84, 3);
      @printf("TEST-4...%s\n",result);
      
      result = driver(42, 79, 42);
      @printf("TEST-5...%s\n",result);
      
      result = driver(7, 2, 3);
      @printf("TEST-6...%s\n",result);
      
      result = driver(99, 83, 99);
      @printf("TEST-7...%s\n",result);
      
      result = driver(13, 61, 13);
      @printf("TEST-8...%s\n",result);
      
      result = driver(44, 8, 44);
      @printf("TEST-9...%s\n",result);
      
  end
  
  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 ) );
  }