結果

問題 No.1620 Substring Sum
ユーザー 👑 rin204rin204
提出日時 2022-04-04 00:23:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 49 ms / 2,000 ms
コード長 166 bytes
コンパイル時間 133 ms
コンパイル使用メモリ 82,312 KB
実行使用メモリ 70,492 KB
最終ジャッジ日時 2024-05-03 10:04:39
合計ジャッジ時間 2,044 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,968 KB
testcase_01 AC 35 ms
53,076 KB
testcase_02 AC 33 ms
52,632 KB
testcase_03 AC 35 ms
52,212 KB
testcase_04 AC 43 ms
70,024 KB
testcase_05 AC 46 ms
69,732 KB
testcase_06 AC 43 ms
69,476 KB
testcase_07 AC 43 ms
68,968 KB
testcase_08 AC 43 ms
69,628 KB
testcase_09 AC 44 ms
69,944 KB
testcase_10 AC 46 ms
69,648 KB
testcase_11 AC 46 ms
68,964 KB
testcase_12 AC 41 ms
62,196 KB
testcase_13 AC 44 ms
68,632 KB
testcase_14 AC 43 ms
68,676 KB
testcase_15 AC 43 ms
68,424 KB
testcase_16 AC 42 ms
65,228 KB
testcase_17 AC 43 ms
67,696 KB
testcase_18 AC 34 ms
53,036 KB
testcase_19 AC 34 ms
52,824 KB
testcase_20 AC 45 ms
69,528 KB
testcase_21 AC 49 ms
70,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353

S = input()
ans = 0
times = 1
for s in S:
    s = int(s)
    ans *= 11
    ans += s * times
    ans %= MOD
    times *= 2
    times %= MOD
print(ans)
0