結果

問題 No.1620 Substring Sum
ユーザー hir355hir355
提出日時 2021-07-22 21:55:49
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 268 ms / 2,000 ms
コード長 158 bytes
コンパイル時間 1,733 ms
コンパイル使用メモリ 86,108 KB
実行使用メモリ 76,816 KB
最終ジャッジ日時 2023-09-24 16:45:37
合計ジャッジ時間 5,736 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
71,208 KB
testcase_01 AC 87 ms
70,952 KB
testcase_02 AC 80 ms
70,952 KB
testcase_03 AC 84 ms
71,100 KB
testcase_04 AC 268 ms
76,816 KB
testcase_05 AC 256 ms
76,660 KB
testcase_06 AC 259 ms
76,580 KB
testcase_07 AC 255 ms
76,688 KB
testcase_08 AC 254 ms
76,668 KB
testcase_09 AC 253 ms
76,564 KB
testcase_10 AC 251 ms
76,576 KB
testcase_11 AC 243 ms
76,408 KB
testcase_12 AC 126 ms
75,988 KB
testcase_13 AC 232 ms
76,648 KB
testcase_14 AC 239 ms
76,648 KB
testcase_15 AC 226 ms
76,812 KB
testcase_16 AC 178 ms
75,912 KB
testcase_17 AC 219 ms
76,588 KB
testcase_18 AC 77 ms
70,952 KB
testcase_19 AC 77 ms
71,048 KB
testcase_20 AC 253 ms
76,684 KB
testcase_21 AC 259 ms
76,560 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353
s = input()
ans = 0
for i in range(len(s)):
    ans += (ord(s[i]) - ord('0')) * pow(11, len(s) - i - 1, MOD) * pow(2, i, MOD)
print(ans % MOD)
0