![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数论
文章平均质量分 52
Piink
博主已停更
展开
-
Biorhythms HDU - 1370(中国剩余定理)
Some people believe that there are three cycles in a person’s life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they have periods of lengths 23, 28, and 33 days, respectively. There is o原创 2021-06-17 20:00:24 · 153 阅读 · 0 评论 -
总结约瑟夫环问题
n个人(编号0~(n-1)),从0开始报数,报到(m-1)的退出,剩下的人继续从0开始报数。求胜利者的编号。 题目练习: https://vjudge.net/problem/LightOJ-1179 主要代码: int f=0; for(int i=1;i<=n;i++) f=(f+k)%i; 代码: #include<stdio.h> int main() { int t,id=0; scanf("%d",&t); while(t--)原创 2021-05-11 16:04:47 · 154 阅读 · 0 评论 -
「一本通 6.3 例 1」反素数 Antiprime
题目描述 原题来自:POI 2001 如果一个大于等于 1的正整数 ,满足所有小于n 且大于等于 1 的所有正整数的约数个数都小于 n的约数个数,则 n是一个反素数。譬如:1,2,4,6,12,24它们都是反素数。 请你计算不大于 n 的最大反素数。 输入格式 一行一个正整数n 。 输出格式 只包含一个整数,即不大于 n的最大反素数。 样例 输入 1000 输出 840 数据范围与提示 对于10%的数据,1<=n<=10^3; 对于40%的数据,1<=n<=10^6; 对于10原创 2021-02-20 15:33:49 · 496 阅读 · 1 评论