問題一覧 > 通常問題

No.1573 Divisor Function

レベル : / AI推定難易度 : 1425 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 38
作問者 : sushitoruna / テスター : maguro blackyuki PCTprobability
お気に入りにしたユーザー ProblemId : 6339 / 自分の提出
問題文最終更新日: 2021-06-27 13:02:22
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
灘校文化祭コンテスト 2021 day2 (順位表) の他の問題:

Problem Statement

For positive integers $x,y$, define $f(x,y)=\displaystyle \sum_{i|x\ \land\ 1 \le i \le y}^{} (x+i)$.

In other words, $f(x,y)$ is the sum of $x+i$ over all divisors $i$ of $x$ that are at least $1$ and at most $y$.

Find $\displaystyle \sum_{i=1}^{n} f(i,m)$ modulo $998244353$.

Input

$n\ m$

  • All inputs are integers.
  • $1 \le n,m \le 10^9$

Output

Output $\displaystyle \sum_{i=1}^{n}f(i,m)$ modulo $998244353$.

Sample

Sample 1
Input
6 3
Output
60


$\{ (1 + 1) \} + \{ (2 + 1) + (2 + 2) \} + \{ (3 + 1) + (3 + 3) \} + \{ (4 + 1) + (4 + 2) \} + \{ (5 + 1) \} + \{ (6 + 1) + (6 + 2) + (6 + 3) \} = 60 $

Note that divisors exceeding $3$ are not added.

Sample 2
Input
2020 1000
Output
17124456

Sample 3
Input
1000000000 562967432
Output
954330278

Output the answer modulo $998244353$.

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