No.2576 LCM Pattern
問題文最終更新日: 2023-12-03 17:49:56
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
Advent Calendar Contest 2023
(順位表)
の他の問題:
Problem Statement
Among sequences of length $N$ consisting of positive integers, find the number of sequences in which the least common multiple of the $N$ integers is $M$, and print it modulo $998244353$.
Input
$N\ M$
Constraints
- $ 2 \le N \le 10^{9}$
- $ 1 \le M \le 10^{9}$
- All inputs are integers
Output
Print the answer modulo $998244353$, followed by a newline.
Sample
Sample 1
Input
2 4
Output
5
Among sequences of length $2$ consisting of positive integers, the following $5$ sequences have $4$ as the least common multiple of the $2$ integers.
1 44 12 44 24 4
Sample 2
Input
3 60
Output
931
Sample 3
Input
2 1000000
Output
169
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
H20
minato