【Hello 2018 A】 Modular Exponentiation

【链接】 我是链接,点我呀:)
【题意】

在这里输入题意

【题解】

当a=1e8的时候,直接输出m就可以了

【代码】

#include <bits/stdc++.h>
#define ll long long
using namespace std;

ll n,m;

int main(){
	#ifdef LOCAL_DEFINE
	    freopen("rush_in.txt", "r", stdin);
	#endif
	ios::sync_with_stdio(0),cin.tie(0);
    cin >> n >> m;
    //m%2^n
    if (n>=32){
        cout << m << endl;
    }else{
       ll now = 1;
       for (int i = 1;i <= n;i++)
            now = now*2;
       cout << m%now<<endl;
    }
	return 0;
}
原文地址:https://www.cnblogs.com/AWCXV/p/8249915.html