![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数论
wust_wenhao
啊咧咧
展开
-
light oj 1220
题目连接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=26932 M原创 2015-07-27 20:08:54 · 560 阅读 · 0 评论 -
light oj 1067 组合数取模
Given n different objects, you want to take k of them. How many ways to can do it?For example, say there are 4 items; you want to take 2 of them. So, you can do it 6 ways.Take 1, 2Take 1,原创 2015-07-24 23:21:44 · 581 阅读 · 0 评论 -
【AekdyCoin】求小于等于N的与N互质的数的和
又向大牛学到了一点。以下内容转大牛文章:if gcd(n,i)=1 then gcd(n,n-i)=1 (1反证法:如果存在K!=1使gcd(n,n-i)=k,那么(n-i)%k==0而n%k=0那么必须保证i%k=0k是n的因子,如果i%k=0那么gcd(n,i)=k,矛盾出现;于是问题变的非常简单ANS=N*phi(N)/2i,n-i总是成对转载 2015-07-24 23:39:19 · 712 阅读 · 1 评论