ap
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
AP数(apnumber)
定义f(x)为x的因数个数。f(1)=1,f(2)=f(3)=2,f(4)=3,f(5)=2,f(6)=4.
1的因数有1个:1
2的因数有2个:1,2
3的因数有2个:1,3
4的因数有3个:1,2,4
5的因数有2个:1,5
6的因数有4个:1,2,3,6
若数x是ap数,那么对于所有小于x的正整数y,有x的因数个数大于y的因数个数,也就是说,对于任意的正整数y<x都满足f(x)>f(y)。
于是1,2,4,6都是ap数。
给出一个正整数m,求小于等于m的最大的ap数。
输入(apnumber.in)
输出(apnumber.out)
输入1:
5
输出1:
4
输入2:
7
输出2:
6
数据范围:
30%: m<=10^3
60%: m<=10^6
100%: m<=10^9
周六提高比赛1
- Status
- Done
- Rule
- IOI
- Problem
- 3
- Start at
- 2022-9-17 8:15
- End at
- 2022-9-17 15:15
- Duration
- 7 hour(s)
- Host
- Partic.
- 25