結果
| 問題 |
No.1620 Substring Sum
|
| コンテスト | |
| ユーザー |
wolgnik
|
| 提出日時 | 2021-07-22 21:45:05 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 148 ms / 2,000 ms |
| コード長 | 203 bytes |
| コンパイル時間 | 203 ms |
| コンパイル使用メモリ | 82,428 KB |
| 実行使用メモリ | 87,056 KB |
| 最終ジャッジ日時 | 2024-07-17 17:07:32 |
| 合計ジャッジ時間 | 3,886 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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