結果

問題 No.1620 Substring Sum
ユーザー titiatitia
提出日時 2021-07-22 23:11:26
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 806 ms / 2,000 ms
コード長 166 bytes
コンパイル時間 546 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 8,392 KB
最終ジャッジ日時 2023-09-24 19:12:18
合計ジャッジ時間 13,139 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,744 KB
testcase_01 AC 14 ms
7,908 KB
testcase_02 AC 14 ms
7,784 KB
testcase_03 AC 15 ms
7,868 KB
testcase_04 AC 786 ms
8,356 KB
testcase_05 AC 795 ms
8,176 KB
testcase_06 AC 796 ms
8,368 KB
testcase_07 AC 783 ms
8,244 KB
testcase_08 AC 806 ms
8,204 KB
testcase_09 AC 746 ms
8,240 KB
testcase_10 AC 776 ms
8,176 KB
testcase_11 AC 771 ms
8,164 KB
testcase_12 AC 248 ms
8,236 KB
testcase_13 AC 720 ms
8,200 KB
testcase_14 AC 727 ms
8,272 KB
testcase_15 AC 635 ms
8,208 KB
testcase_16 AC 451 ms
8,180 KB
testcase_17 AC 614 ms
8,216 KB
testcase_18 AC 15 ms
7,752 KB
testcase_19 AC 15 ms
7,692 KB
testcase_20 AC 778 ms
8,392 KB
testcase_21 AC 781 ms
8,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S=input()
mod=998244353

ANS=0
LEN=len(S)

for i in range(LEN):
    x=int(S[i])
    ANS+=pow(11,LEN-i-1,mod)*x*pow(2,i,mod)
    ANS%=mod

    #print(ANS)

print(ANS)
0