結果

問題 No.1299 Random Array Score
ユーザー universatouniversato
提出日時 2020-11-27 21:49:29
言語 Ruby
(3.3.0)
結果
AC  
実行時間 163 ms / 2,000 ms
コード長 129 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 11,536 KB
実行使用メモリ 28,780 KB
最終ジャッジ日時 2023-10-01 05:19:09
合計ジャッジ時間 7,207 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,132 KB
testcase_01 AC 78 ms
15,128 KB
testcase_02 AC 80 ms
15,052 KB
testcase_03 AC 158 ms
28,492 KB
testcase_04 AC 158 ms
28,288 KB
testcase_05 AC 142 ms
25,248 KB
testcase_06 AC 136 ms
24,008 KB
testcase_07 AC 137 ms
24,476 KB
testcase_08 AC 157 ms
27,908 KB
testcase_09 AC 82 ms
15,424 KB
testcase_10 AC 109 ms
20,332 KB
testcase_11 AC 87 ms
16,228 KB
testcase_12 AC 135 ms
23,636 KB
testcase_13 AC 153 ms
27,512 KB
testcase_14 AC 136 ms
23,880 KB
testcase_15 AC 134 ms
24,108 KB
testcase_16 AC 135 ms
24,060 KB
testcase_17 AC 92 ms
16,652 KB
testcase_18 AC 112 ms
20,604 KB
testcase_19 AC 125 ms
21,828 KB
testcase_20 AC 102 ms
18,512 KB
testcase_21 AC 82 ms
15,196 KB
testcase_22 AC 93 ms
17,084 KB
testcase_23 AC 136 ms
23,904 KB
testcase_24 AC 142 ms
24,956 KB
testcase_25 AC 135 ms
24,020 KB
testcase_26 AC 81 ms
15,088 KB
testcase_27 AC 95 ms
17,080 KB
testcase_28 AC 88 ms
16,460 KB
testcase_29 AC 98 ms
17,684 KB
testcase_30 AC 132 ms
23,240 KB
testcase_31 AC 98 ms
18,204 KB
testcase_32 AC 156 ms
27,492 KB
testcase_33 AC 162 ms
28,672 KB
testcase_34 AC 152 ms
27,036 KB
testcase_35 AC 163 ms
28,780 KB
testcase_36 AC 150 ms
26,924 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

mod = 998244353

n, k = gets.to_s.split.map{ |e| e.to_i }
a    = gets.to_s.split.map{ |e| e.to_i }

p a.sum * 2.pow(k, mod) % mod
0