注意一下溢出问题就能过…
#include <iostream>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
int main(){
ull x,mo,ans=1 ;
cin>>x>>mo;
if(x>=30)cout<<mo;
else cout<<mo%(1<<x);
}
注意一下溢出问题就能过…
#include <iostream>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
int main(){
ull x,mo,ans=1 ;
cin>>x>>mo;
if(x>=30)cout<<mo;
else cout<<mo%(1<<x);
}