結果

問題 No.1620 Substring Sum
ユーザー vltmttvltmtt
提出日時 2021-07-22 22:52:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 247 ms / 2,000 ms
コード長 151 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 87,128 KB
実行使用メモリ 77,024 KB
最終ジャッジ日時 2023-09-24 18:33:19
合計ジャッジ時間 5,492 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,404 KB
testcase_01 AC 73 ms
71,096 KB
testcase_02 AC 74 ms
71,356 KB
testcase_03 AC 75 ms
71,092 KB
testcase_04 AC 247 ms
77,024 KB
testcase_05 AC 246 ms
77,008 KB
testcase_06 AC 245 ms
76,844 KB
testcase_07 AC 243 ms
77,020 KB
testcase_08 AC 246 ms
76,984 KB
testcase_09 AC 240 ms
76,924 KB
testcase_10 AC 245 ms
76,892 KB
testcase_11 AC 240 ms
76,832 KB
testcase_12 AC 128 ms
76,628 KB
testcase_13 AC 228 ms
76,856 KB
testcase_14 AC 234 ms
77,016 KB
testcase_15 AC 212 ms
76,548 KB
testcase_16 AC 170 ms
76,556 KB
testcase_17 AC 208 ms
76,588 KB
testcase_18 AC 70 ms
71,420 KB
testcase_19 AC 74 ms
71,252 KB
testcase_20 AC 246 ms
76,660 KB
testcase_21 AC 247 ms
76,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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