摘要:
###快速幂就是将指数二进制化 #include<bits/stdc++.h> using namespace std; typedef long long LL; int n; LL qmi(LL a, int b, int p) { LL res = 1; while(b){ if(b&1) r 阅读全文
posted @ 2021-10-14 21:08
对影丶成三人
阅读(29)
评论(0)
推荐(0)
|
摘要:
###快速幂就是将指数二进制化 #include<bits/stdc++.h> using namespace std; typedef long long LL; int n; LL qmi(LL a, int b, int p) { LL res = 1; while(b){ if(b&1) r 阅读全文
posted @ 2021-10-14 21:08
对影丶成三人
阅读(29)
评论(0)
推荐(0)
摘要:
别的没啥可说的,为了整除出数据,要改写一下公式 N*(p1-1/p1)->N/p1*(p1-1) #include<bits/stdc++.h> using namespace std; int n; int main() { cin>>n; while(n--){ int a; cin>>a; i 阅读全文
posted @ 2021-10-14 15:21
对影丶成三人
阅读(41)
评论(0)
推荐(0)
|