标签:question include span text tput put black clu turn
3个正整数A B C,中间用空格分隔。(1 <= A,B,C <= 10^9)
输出计算结果
3 5 8
3
1 #include <iostream> 2 using namespace std; 3 #define ll long long 4 ll get_pow(ll x, ll n, ll c){ 5 ll ans = 1; 6 while(n){ 7 if(n & 1){ 8 ans = (ans * x) % c; 9 } 10 x = x * x % c; 11 n >>= 1; 12 } 13 return ans; 14 } 15 int main(){ 16 ll a, b, c; 17 cin >> a >> b >> c; 18 cout << get_pow(a, b, c) << endl; 19 return 0; 20 }
标签:question include span text tput put black clu turn
原文地址:http://www.cnblogs.com/jxust-jiege666/p/6700716.html