結果

問題 No.1463 Hungry Kanten
ユーザー kotatsugamekotatsugame
提出日時 2021-04-02 21:28:33
言語 Ruby
(3.2.2)
結果
AC  
実行時間 623 ms / 2,000 ms
コード長 111 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 11,556 KB
実行使用メモリ 48,916 KB
最終ジャッジ日時 2023-08-25 14:46:37
合計ジャッジ時間 4,769 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,092 KB
testcase_01 AC 81 ms
15,116 KB
testcase_02 AC 98 ms
16,504 KB
testcase_03 AC 594 ms
40,588 KB
testcase_04 AC 82 ms
15,044 KB
testcase_05 AC 623 ms
48,916 KB
testcase_06 AC 84 ms
15,208 KB
testcase_07 AC 83 ms
15,136 KB
testcase_08 AC 83 ms
15,152 KB
testcase_09 AC 82 ms
15,300 KB
testcase_10 AC 82 ms
15,208 KB
testcase_11 AC 82 ms
15,032 KB
testcase_12 AC 82 ms
15,192 KB
testcase_13 AC 82 ms
15,168 KB
testcase_14 AC 87 ms
15,644 KB
testcase_15 AC 85 ms
15,148 KB
testcase_16 AC 98 ms
16,156 KB
testcase_17 AC 121 ms
18,772 KB
testcase_18 AC 103 ms
16,012 KB
testcase_19 AC 259 ms
29,924 KB
testcase_20 AC 390 ms
36,448 KB
testcase_21 AC 84 ms
15,296 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

(N,K),A=$<.map{_1.split.map &:to_i}
h=[]
K.upto(N){|k|A.combination(k){h<<_1.sum<<_1.reduce(:*)}}
p h.uniq.size
0