問題一覧 > 通常問題

No.2576 LCM Pattern

レベル : / AI推定難易度 : 1100 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 95
作問者 : H20 / テスター : minato
お気に入りにしたユーザー ProblemId : 9278 / 自分の提出
問題文最終更新日: 2023-12-03 17:49:56
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 4
  • 4 1
  • 2 4
  • 4 2
  • 4 4

Sample 2
Input
3 60
Output
931

Sample 3
Input
2 1000000
Output
169

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。