[JZOJ 4732] 函數{Eratosthenes篩法,歐拉函數}

題目 解題思路 這道題其實就是在求 1 ∼ n 1\sim n 1∼n的 p h i ( n ) phi(n) phi(n)歐拉函數 對與分解質因數,可以用Eratosthenes篩法來篩。 代碼 #include<cstdio> #include<iostream> #define rr register using namespace std; int n,m,v[10000001],pr
相關文章
相關標籤/搜索