摘要:
中国剩余定理: 代码实现: //互质版中国剩余定理(CRT) #include<iostream> using namespace std; typedef long long LL; const int N=20; LL a[N], b[N]; int n; void exgcd(LL a, LL 阅读全文
posted @ 2023-04-30 11:17
回忆、少年
阅读(36)
评论(0)
推荐(0)
摘要:
整除的概念和性质: 素数和合数的定义: 例题一: 阅读全文
posted @ 2023-04-30 01:18
回忆、少年
阅读(38)
评论(0)
推荐(0)
摘要:
欧几里得算法基本原理和证明 代码实现: #include<iostream> using namespace std; int gcd(int a,int b){ return b?gcd(b,a%b):a; } int main(){ int x,y; cin>>x>>y; cout<<gcd(x 阅读全文
posted @ 2023-04-30 01:18
回忆、少年
阅读(18)
评论(0)
推荐(0)
摘要:
欧拉函数的定义: 公式法求欧拉函数代码实现: #include<iostream> using namespace std; int main(){ int t; cin>>t; while(t--){ int n; cin>>n; int res=n; for(int i=2;i<=n/i;i++ 阅读全文
posted @ 2023-04-30 00:46
回忆、少年
阅读(25)
评论(0)
推荐(0)

浙公网安备 33010602011771号