#abc370g. G - Divisible by 3
G - Divisible by 3
Score : points
问题陈述
我们称一个正整数 为好整数,当且仅当它的正除数之和能被 整除。 给定两个正整数 和 。找出长度为 的正整数序列 的数量,模 ,使得 中元素的乘积是一个不超过 的好整数。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
We call a positive integer a good integer if and only if the sum of its positive divisors is divisible by .
You are given two positive integers and . Find the number, modulo , of length- sequences of positive integers such that the product of the elements in is a good integer not exceeding .
Constraints
- and are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
10 1
Sample Output 1
5
There are five sequences that satisfy the conditions:
Sample Input 2
4 2
Sample Output 2
2
There are two sequences that satisfy the conditions:
Sample Input 3
370 907
Sample Output 3
221764640
Sample Input 4
10000000000 100000
Sample Output 4
447456146