QOJ.ac

QOJ

Limite de temps : 1.0 s Limite de mémoire : 256 MB Points totaux : 100 Hackable ✓

#11024. 分割

Statistiques

以下规则定义了一种整数元组——Legend Tuple:

  • $(1, k)$ 始终是一个 Legend Tuple,其中 $k$ 为整数。
  • 如果 $(n, k)$ 是一个 Legend Tuple,则 $(n + k, k)$ 也是一个 Legend Tuple。
  • 如果 $(n, k)$ 是一个 Legend Tuple,则 $(nk, k)$ 也是一个 Legend Tuple。

我们想要知道满足 $1 \le n \le N$ 且 $1 \le k \le K$ 的 Legend Tuple $(n, k)$ 的数量。 为了避免计算巨大的整数,请输出答案对 $10^9 + 7$ 取模后的结果。

输入格式

输入包含两个整数 $N$ 和 $K$,$1 \le N, K \le 10^{12}$。

输出格式

输出答案对 $10^9 + 7$ 取模后的结果。

样例

样例输入 1

3 3

样例输出 1

8

样例输入 2

3 9

样例输出 2

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.