結果

問題 No.1620 Substring Sum
ユーザー shakayamishakayami
提出日時 2023-01-24 18:35:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 253 ms / 2,000 ms
コード長 135 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 86,988 KB
実行使用メモリ 76,996 KB
最終ジャッジ日時 2023-09-08 12:23:35
合計ジャッジ時間 5,788 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,348 KB
testcase_01 AC 76 ms
71,304 KB
testcase_02 AC 78 ms
71,292 KB
testcase_03 AC 77 ms
71,292 KB
testcase_04 AC 253 ms
76,916 KB
testcase_05 AC 251 ms
76,816 KB
testcase_06 AC 251 ms
76,944 KB
testcase_07 AC 250 ms
76,904 KB
testcase_08 AC 248 ms
76,672 KB
testcase_09 AC 241 ms
76,924 KB
testcase_10 AC 248 ms
76,912 KB
testcase_11 AC 246 ms
76,656 KB
testcase_12 AC 128 ms
76,704 KB
testcase_13 AC 233 ms
76,876 KB
testcase_14 AC 236 ms
76,996 KB
testcase_15 AC 217 ms
76,744 KB
testcase_16 AC 176 ms
76,308 KB
testcase_17 AC 209 ms
76,852 KB
testcase_18 AC 77 ms
71,096 KB
testcase_19 AC 77 ms
71,556 KB
testcase_20 AC 249 ms
76,612 KB
testcase_21 AC 250 ms
76,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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