QOJ.ac

QOJ

Limite de temps : 2 s Limite de mémoire : 512 MB Points totaux : 100

#7251. 2016

Statistiques

新年快乐!整数 2016 拥有非常多的约数。

设 $d(n)$ 为 $n$ 的约数个数。例如,$d(12) = 6$,因为 12 有 6 个约数:1, 2, 3, 4, 6 和 12。如果一个正整数 $x$ 满足:小于 $x$ 且约数个数多于 $d(x)$ 的正整数 $y$ 最多只有一个,则称 $x$ 为“高约数”数(divisorful number)。例如,2016 是一个高约数数,因为在小于 2016 的整数中,只有 1680 的约数个数比 2016 多。

给定一个整数 $K$,请计算第 $K$ 小(从 1 开始计数)的高约数数。如果该数严格大于 $10^{18}$,则输出 $-1$。

输入格式

输入包含一个整数 $K$ ($1 \le K \le 10^9$)。

输出格式

在一行中输出答案。

样例

输入 1

10

输出 1

14

输入 2

1000000000

输出 2

-1

说明

最小的高约数数依次为 1, 2, 3, 4, 5, 6, 8, 10, 12, 14, ...

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.