标签:ota int res efi amp include des BMI ==
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 10383 Accepted Submission(s):
8302
#include<stdio.h> #include<iostream> #include<algorithm> #include<cstring> #include<math.h> #include<string> #define ll long long #define inf 0x3f3f3f3f using namespace std; const ll p=9973; ll power(ll a,ll b)//快速幂 { ll res=1; while(b) { if(b%2==1) res=res*a%p; b=b/2; a=a*a%p; } return res%p; } int main() { ll t,n,b; scanf("%lld",&t); while(t--) { scanf("%lld%lld",&n,&b); ll ans; ans=n*power(b,p-2)%p; printf("%lld\n",ans); } return 0; }
hdu1576-A/B-(同余定理+乘法逆元+费马小定理+快速幂)
标签:ota int res efi amp include des BMI ==
原文地址:https://www.cnblogs.com/shoulinniao/p/10358910.html