問題一覧 > 通常問題

No.2891 Mint

レベル : / AI推定難易度 : 1300 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 76
作問者 : 👑 seekworser / テスター : yuusaan kemuniku
お気に入りにしたユーザー ProblemId : 11145 / 自分の提出
問題文最終更新日: 2024-09-12 11:07:57
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
yukicoder contest 446 (順位表) の他の問題:

Problem Statement

You are given $N, M$. Compute the value of the following expression. $$\displaystyle \sum_{k=1}^N (M \bmod{k} )$$

Since the answer can be very large, output it modulo $998244353$.

Input

$N$ $M$

Constraints

  • $1 \le N, M \le 10^{12}$
  • All inputs are integers.

Output

Output the answer on a single line, in $1$ line.

Sample

Sample 1
Input
3 5
Output
3

We have $(5 \bmod 1) + (5 \bmod 2) + (5 \bmod 3) = 0 + 1 + 2 = 3$.

Sample 2
Input
100 1
Output
99
Sample 3
Input
1000000 1000000
Output
842631082

Output the answer modulo $998244353$.

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