結果

問題 No.1620 Substring Sum
ユーザー AEnAEn
提出日時 2023-01-18 02:00:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 244 ms / 2,000 ms
コード長 144 bytes
コンパイル時間 1,669 ms
コンパイル使用メモリ 86,740 KB
実行使用メモリ 76,732 KB
最終ジャッジ日時 2023-09-01 23:28:32
合計ジャッジ時間 6,549 ms
ジャッジサーバーID
(参考情報)
judge11 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,104 KB
testcase_01 AC 69 ms
71,232 KB
testcase_02 AC 69 ms
71,244 KB
testcase_03 AC 70 ms
71,376 KB
testcase_04 AC 243 ms
76,604 KB
testcase_05 AC 240 ms
76,628 KB
testcase_06 AC 244 ms
76,644 KB
testcase_07 AC 241 ms
76,628 KB
testcase_08 AC 240 ms
76,556 KB
testcase_09 AC 233 ms
76,612 KB
testcase_10 AC 241 ms
76,480 KB
testcase_11 AC 234 ms
76,732 KB
testcase_12 AC 125 ms
76,220 KB
testcase_13 AC 220 ms
76,616 KB
testcase_14 AC 230 ms
76,596 KB
testcase_15 AC 207 ms
76,476 KB
testcase_16 AC 168 ms
76,244 KB
testcase_17 AC 202 ms
76,244 KB
testcase_18 AC 70 ms
71,452 KB
testcase_19 AC 71 ms
71,168 KB
testcase_20 AC 241 ms
76,452 KB
testcase_21 AC 240 ms
76,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
N = len(S)
mod = 998244353

res = 0
for i in range(N):
    res += int(S[i])*pow(2,i,mod)*pow(11,N-i-1,mod)
    res %= mod
print(res)
0