标签:nbsp cout long space efi main bsp pac cin
1 #include<bits/stdc++.h> 2 3 using namespace std; 4 5 #define LL long long 6 7 int main(){ 8 LL a,b,m; 9 cin >> a >> b >> m; 10 LL ans = 0; 11 while(b){ 12 if(b & 1) ans = (ans + a) % m; 13 a = (a<<1) % m; 14 b >>= 1; 15 } 16 cout << ans << endl; 17 return 0; 18 }
标签:nbsp cout long space efi main bsp pac cin
原文地址:https://www.cnblogs.com/zhangqiling/p/12459728.html