結果

問題 No.1299 Random Array Score
ユーザー KudeKude
提出日時 2020-11-27 22:55:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 574 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 589 ms
コンパイル使用メモリ 87,088 KB
実行使用メモリ 104,612 KB
最終ジャッジ日時 2023-10-09 20:55:27
合計ジャッジ時間 13,778 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,564 KB
testcase_01 AC 61 ms
71,308 KB
testcase_02 AC 59 ms
71,360 KB
testcase_03 AC 557 ms
100,504 KB
testcase_04 AC 570 ms
100,460 KB
testcase_05 AC 446 ms
101,800 KB
testcase_06 AC 387 ms
99,024 KB
testcase_07 AC 424 ms
99,168 KB
testcase_08 AC 560 ms
100,304 KB
testcase_09 AC 86 ms
76,804 KB
testcase_10 AC 254 ms
87,972 KB
testcase_11 AC 120 ms
78,360 KB
testcase_12 AC 394 ms
96,660 KB
testcase_13 AC 553 ms
101,908 KB
testcase_14 AC 397 ms
96,704 KB
testcase_15 AC 411 ms
98,980 KB
testcase_16 AC 416 ms
99,140 KB
testcase_17 AC 137 ms
79,432 KB
testcase_18 AC 265 ms
89,652 KB
testcase_19 AC 320 ms
92,572 KB
testcase_20 AC 205 ms
84,096 KB
testcase_21 AC 83 ms
76,756 KB
testcase_22 AC 149 ms
80,240 KB
testcase_23 AC 408 ms
99,068 KB
testcase_24 AC 445 ms
101,724 KB
testcase_25 AC 393 ms
96,860 KB
testcase_26 AC 80 ms
76,616 KB
testcase_27 AC 159 ms
80,736 KB
testcase_28 AC 134 ms
79,012 KB
testcase_29 AC 167 ms
82,528 KB
testcase_30 AC 377 ms
96,440 KB
testcase_31 AC 183 ms
82,308 KB
testcase_32 AC 524 ms
101,952 KB
testcase_33 AC 574 ms
100,212 KB
testcase_34 AC 499 ms
104,612 KB
testcase_35 AC 293 ms
100,032 KB
testcase_36 AC 271 ms
104,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353
n, k = map(int, input().split())
a = list(map(int, input().split()))
ans = 0
for ai in a:
    ans += ai
    ans += (ai * n * (pow(2, k, mod) - 1)) * pow(n, mod-2, mod)
    ans %= mod
print(ans)
0