問題一覧 > 通常問題

No.1620 Substring Sum

レベル : / AI推定難易度 : 1050 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 171
作問者 : だれ / テスター : nok0 yuto1115
お気に入りにしたユーザー ProblemId : 6560 / 自分の提出
問題文最終更新日: 2026-04-28 14:21:07
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
問題文一行コンテスト (順位表) の他の問題:

Problem Statement

For every non-empty, not necessarily contiguous substring of a string $S$ consisting only of 1 ~ 9, consider its value when regarded as an integer in decimal notation, and find the sum of these values.

Input

$S$

  • $1\leq |S|\leq 2\times 10^5$
  • $S$ consists only of 1 ~ 9

Output

Print the answer on one line.

Since the answer can be very large, print the remainder when divided by $998244353$.

Sample

Sample 1
Input
123
Output
177

$1+2+3+12+13+23+123=177$.

Sample 2
Input
3141592653589793238462643383279
Output
103881841

Answer with the remainder when divided by $998244353$.

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