結果
| 問題 | No.1620 Substring Sum |
| コンテスト | |
| ユーザー |
wolgnik
|
| 提出日時 | 2021-07-22 21:45:05 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 102 ms / 2,000 ms |
| + 220µs | |
| コード長 | 203 bytes |
| 記録 | |
| コンパイル時間 | 228 ms |
| コンパイル使用メモリ | 95,848 KB |
| 実行使用メモリ | 102,316 KB |
| 最終ジャッジ日時 | 2026-08-15 18:34:00 |
| 合計ジャッジ時間 | 3,444 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 |
ソースコード
import sys input = sys.stdin.readline S = list(map(int, list(input())[: -1])) mod = 998244353 dp = 0 for i in range(len(S)): x = S[i] dp += (dp * 10 + x * pow(2, i, mod)) % mod dp %= mod print(dp)
wolgnik