ACM 数论
文章平均质量分 56
Beauties1
这个作者很懒,什么都没留下…
展开
-
E - Leading and Trailing LightOJ - 1282(快速幂 modf函数
求n^k前三位,后三位 前三位用10^x=n^k x = log10(N^k) = k*log10(N) = a(整数部分)+b(小数部分) //求一个数 p 的小数部分 y=modf(p,&q) ,整数部分存到 q 后三位直接用 快速幂 求得 (模板) You are given two integers:nandk, your task is to find the most significant three digits, and least significant t...原创 2021-08-05 13:22:11 · 98 阅读 · 0 评论 -
【LightOJ1336】Sigma Function(数论)
我要放弃了,哭死,我可以把解题方法bei下来吗...... 由一系列的公式推导,求n-sqrt(n)-sqrt(n/2). 对,我很喜欢数论......(妖魔鬼怪远离我妖魔鬼怪远离我 求和运算是一种有趣的操作,它来源于古希腊字母σ,现在我们来求一个数字的所有因子之和。例如σ(24)=1+2+3+4+6+8+12+24=60.对于小的数字求和是非常的简单,但是对于大数字求和就比较困难了。现在给你一个n,你需要求出有多少个[ 1 , n ]区间内的数字σ是偶数。 注:一个数字的σ指这个数的所有因子之和原创 2021-08-04 19:52:14 · 79 阅读 · 0 评论 -
Bi-shoe and Phi-shoe LightOJ - 1370(欧拉函数)
Bamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-shoe is a very popular coach for his success. He needs some bamboos for his students, so he asked his assistant Bi-Shoe to go to the market and buy them. Plenty of Bamboos of all p.原创 2021-08-04 15:54:51 · 103 阅读 · 0 评论