标签:快速 const its lse int else == code --
#include<bits/stdc++.h> using namespace std; #define int long long const int mod=1e4+7; int quick(int x,int n) { if(n==0) return 1; int ans=1; int t=x; while(n) { if(n%2==1) ans=(ans*t)%mod,n--; else t=(t*t)%mod,n=n/2; } return ans; } int32_t main() { int a,b,k,n,m; cin>>a>>b>>k>>n>>m; int ans1=quick(a,n); int ans2=quick(b,m); }
标签:快速 const its lse int else == code --
原文地址:https://www.cnblogs.com/Andromeda-Galaxy/p/9517311.html