AtCoder Talent Quest 〜现在就让28届毕业生逃脱吧〜预选赛 #2(第 480 场 AtCoder Beginner Contest)
乘积受限的等差数列AI (CI翻译)
Problem Statement
题目描述
AI (CI翻译)A sequence of positive integers $A=(A_1,\dots,A_{|A|})$ is called a good sequence if it satisfies all of the following conditions.
如果一个正整数序列 $A=(A_1,\dots,A_{|A|})$ 满足以下所有条件,则称其为好序列。AI (CI翻译)
$|A|\geq 3$$A$is an arithmetic progression; that is,$A_{i+1}-A_{i}=A_2-A_1$for all$1 \leq i \leq |A|-1$.$A_2-A_1 > 0$
$|A|\geq 3$$A$是等差数列;也就是说,对于所有$1 \leq i \leq |A|-1$,都有$A_{i+1}-A_{i}=A_2-A_1$。$A_2-A_1 > 0$
Find the number of good sequences such that the product of all elements is at most $N$.
求所有元素的乘积不超过 $N$ 的好序列的数量。AI (CI翻译)
It can be proved that the answer is at most $10^{18}$ under the constraints.
可以证明,在给定约束下,答案不超过 $10^{18}$。AI (CI翻译)
Constraints
约束条件
AI (CI翻译)$1 \leq N \leq 10^{18}$$N$is an integer.
$1 \leq N \leq 10^{18}$$N$是整数。
Input
输入格式
AI (CI翻译)The input is given from Standard Input in the following format:
输入从标准输入按以下格式给出:AI (CI翻译)
N
NAI (CI翻译)
Output
输出格式
AI (CI翻译)Print the answer.
输出答案。AI (CI翻译)
样例
Input #1
120
Output #1
18
There are $4$ good sequences whose product is at most $24$: $(1,2,3),(1,2,3,4),(1,3,5),(2,3,4)$.
Input #2
1000000000000000000
Output #2
1051148114007
题目信息
题号
abc480_e
时间限制
2 s
内存限制
1024 MB
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。