結果

問題 No.1299 Random Array Score
ユーザー tamura2004tamura2004
提出日時 2021-01-21 23:20:22
言語 Ruby
(3.3.0)
結果
AC  
実行時間 172 ms / 2,000 ms
コード長 134 bytes
コンパイル時間 59 ms
コンパイル使用メモリ 11,444 KB
実行使用メモリ 29,124 KB
最終ジャッジ日時 2023-08-26 15:05:45
合計ジャッジ時間 8,902 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
15,296 KB
testcase_01 AC 86 ms
15,520 KB
testcase_02 AC 87 ms
15,424 KB
testcase_03 AC 165 ms
28,872 KB
testcase_04 AC 167 ms
28,460 KB
testcase_05 AC 148 ms
25,752 KB
testcase_06 AC 143 ms
24,548 KB
testcase_07 AC 146 ms
25,024 KB
testcase_08 AC 163 ms
28,204 KB
testcase_09 AC 87 ms
15,692 KB
testcase_10 AC 118 ms
20,336 KB
testcase_11 AC 93 ms
16,476 KB
testcase_12 AC 140 ms
23,888 KB
testcase_13 AC 163 ms
27,964 KB
testcase_14 AC 142 ms
24,372 KB
testcase_15 AC 147 ms
24,356 KB
testcase_16 AC 144 ms
24,516 KB
testcase_17 AC 99 ms
16,964 KB
testcase_18 AC 121 ms
21,024 KB
testcase_19 AC 133 ms
22,048 KB
testcase_20 AC 110 ms
18,844 KB
testcase_21 AC 88 ms
15,588 KB
testcase_22 AC 101 ms
16,984 KB
testcase_23 AC 144 ms
24,228 KB
testcase_24 AC 148 ms
25,392 KB
testcase_25 AC 143 ms
24,240 KB
testcase_26 AC 88 ms
15,488 KB
testcase_27 AC 103 ms
17,516 KB
testcase_28 AC 99 ms
16,700 KB
testcase_29 AC 105 ms
18,008 KB
testcase_30 AC 143 ms
23,900 KB
testcase_31 AC 108 ms
18,340 KB
testcase_32 AC 163 ms
28,068 KB
testcase_33 AC 172 ms
29,108 KB
testcase_34 AC 156 ms
27,184 KB
testcase_35 AC 168 ms
29,124 KB
testcase_36 AC 156 ms
27,096 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n, k = gets.to_s.split.map { |v| v.to_i }
a = gets.to_s.split.map { |v| v.to_i }.sum
ans = 2.pow(k, 998244353) * a % 998244353
pp ans
0