結果

問題 No.1299 Random Array Score
ユーザー FromBooskaFromBooska
提出日時 2023-02-20 17:48:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 311 bytes
コンパイル時間 1,875 ms
コンパイル使用メモリ 86,668 KB
実行使用メモリ 103,716 KB
最終ジャッジ日時 2023-09-28 14:50:11
合計ジャッジ時間 8,353 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,048 KB
testcase_01 AC 72 ms
71,192 KB
testcase_02 AC 72 ms
71,348 KB
testcase_03 AC 133 ms
100,568 KB
testcase_04 AC 125 ms
99,736 KB
testcase_05 AC 108 ms
100,760 KB
testcase_06 AC 103 ms
97,528 KB
testcase_07 AC 107 ms
97,756 KB
testcase_08 AC 125 ms
99,888 KB
testcase_09 AC 78 ms
75,684 KB
testcase_10 AC 91 ms
86,860 KB
testcase_11 AC 81 ms
76,632 KB
testcase_12 AC 103 ms
95,252 KB
testcase_13 AC 127 ms
101,764 KB
testcase_14 AC 104 ms
95,684 KB
testcase_15 AC 105 ms
97,632 KB
testcase_16 AC 104 ms
97,720 KB
testcase_17 AC 81 ms
77,780 KB
testcase_18 AC 94 ms
88,528 KB
testcase_19 AC 96 ms
90,508 KB
testcase_20 AC 89 ms
82,724 KB
testcase_21 AC 79 ms
75,504 KB
testcase_22 AC 83 ms
78,492 KB
testcase_23 AC 104 ms
97,544 KB
testcase_24 AC 109 ms
100,552 KB
testcase_25 AC 103 ms
95,408 KB
testcase_26 AC 77 ms
75,712 KB
testcase_27 AC 82 ms
79,248 KB
testcase_28 AC 81 ms
77,408 KB
testcase_29 AC 86 ms
80,824 KB
testcase_30 AC 101 ms
94,964 KB
testcase_31 AC 84 ms
80,832 KB
testcase_32 AC 125 ms
101,736 KB
testcase_33 AC 128 ms
99,216 KB
testcase_34 AC 105 ms
103,660 KB
testcase_35 AC 126 ms
99,120 KB
testcase_36 AC 109 ms
103,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# 1回に加算される数の期待値は(sumA/N)*N
# そこで数列Aは変わった、よって次の期待値は変わる
# 2倍になる、4倍になる、、、

N, K = map(int, input().split())
A = list(map(int, input().split()))
mod = 998244353
sumA = sum(A)
ans = (sumA * pow(2, K, mod))%mod
print(ans)
0