![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数论
笨鸟1号
张占文
展开
-
牛客网
链接:https://www.nowcoder.com/acm/contest/146/G 来源:牛客网 Niuniu likes mathematics. He also likes drawing pictures. One day, he was trying to draw a regular polygon with n vertices. He connected every p...原创 2018-08-11 20:49:21 · 700 阅读 · 0 评论 -
欧拉函数求法
int oula(int n) { //O(n) int rea = n; for (int i = 2; i <= n; i ++) { if(n % i == 0) { rea = rea - rea/i; do{ n /= i; }while(n %...转载 2018-08-08 17:37:55 · 192 阅读 · 0 评论 -
Farey Sequence
http://poj.org/problem?id=2478 求欧拉值的前n项和 Description The Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gc...原创 2018-08-08 17:49:14 · 286 阅读 · 0 评论