A. Primal Sport time limit per test 1.5 seconds memory limit per test 256 megabytes input standard input output standard output Alice and Bob begin their day with a quick game. They first choose a starting number X0 ≥ 3 and try to reach one million b…
Alice and Bob begin their day with a quick game. They first choose a starting number X0 ≥ 3 and try to reach one million by the process described below. Alice goes first and then they take alternating turns. In the i-th turn, the player whose turn it…
A. Primal Sport 题意:有两个人轮流玩游戏.给出数X(i-1),轮到的人需要找到一个小于X(i-1)的素数x,然后得到Xi,Xi是x的倍数中大于等于X(i-1)的最小的数.现在已知X2,求最小的X0? 思路:根据题意,X1的取值范围为[X1-X2的最大质因子+1,X2),同理可知X0的取值范围为[X1-X1的最大质因子+1,,X1). #include<iostream> #include<cstring> #include<cstdio> #includ…