結果

問題 No.1299 Random Array Score
ユーザー googol_S0googol_S0
提出日時 2020-11-27 21:52:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 184 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 86,600 KB
実行使用メモリ 103,620 KB
最終ジャッジ日時 2023-10-01 05:26:49
合計ジャッジ時間 5,796 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,332 KB
testcase_01 AC 71 ms
71,264 KB
testcase_02 AC 71 ms
71,332 KB
testcase_03 AC 127 ms
100,364 KB
testcase_04 AC 127 ms
99,980 KB
testcase_05 AC 109 ms
100,888 KB
testcase_06 AC 103 ms
97,444 KB
testcase_07 AC 105 ms
97,932 KB
testcase_08 AC 125 ms
100,008 KB
testcase_09 AC 76 ms
75,712 KB
testcase_10 AC 89 ms
87,144 KB
testcase_11 AC 78 ms
76,932 KB
testcase_12 AC 102 ms
95,124 KB
testcase_13 AC 124 ms
101,788 KB
testcase_14 AC 102 ms
95,580 KB
testcase_15 AC 104 ms
97,608 KB
testcase_16 AC 105 ms
97,560 KB
testcase_17 AC 83 ms
77,880 KB
testcase_18 AC 95 ms
88,372 KB
testcase_19 AC 95 ms
90,440 KB
testcase_20 AC 87 ms
82,640 KB
testcase_21 AC 74 ms
75,596 KB
testcase_22 AC 80 ms
78,388 KB
testcase_23 AC 104 ms
97,500 KB
testcase_24 AC 109 ms
100,508 KB
testcase_25 AC 101 ms
95,220 KB
testcase_26 AC 77 ms
75,420 KB
testcase_27 AC 84 ms
79,164 KB
testcase_28 AC 79 ms
77,168 KB
testcase_29 AC 84 ms
80,548 KB
testcase_30 AC 100 ms
95,308 KB
testcase_31 AC 84 ms
80,712 KB
testcase_32 AC 126 ms
101,632 KB
testcase_33 AC 126 ms
99,108 KB
testcase_34 AC 108 ms
103,580 KB
testcase_35 AC 128 ms
99,412 KB
testcase_36 AC 109 ms
103,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
A=list(map(int,input().split()))
mod=998244353
if K==0:
  print(sum(A)%mod)
  exit()
P=sum(A)*pow(N,mod-2,mod)%mod
print((sum(A)+P*(pow(2,K,mod)-1)*N)%mod)
0