結果

問題 No.617 Nafmo、買い出しに行く
ユーザー letrangerjpletrangerjp
提出日時 2017-12-17 00:45:57
言語 Ruby
(3.3.0)
結果
AC  
実行時間 354 ms / 2,000 ms
コード長 95 bytes
コンパイル時間 228 ms
コンパイル使用メモリ 11,288 KB
実行使用メモリ 17,340 KB
最終ジャッジ日時 2023-08-21 11:47:11
合計ジャッジ時間 5,693 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,320 KB
testcase_01 AC 80 ms
15,112 KB
testcase_02 AC 79 ms
15,312 KB
testcase_03 AC 97 ms
17,340 KB
testcase_04 AC 78 ms
15,088 KB
testcase_05 AC 119 ms
17,056 KB
testcase_06 AC 351 ms
17,156 KB
testcase_07 AC 351 ms
17,168 KB
testcase_08 AC 78 ms
15,176 KB
testcase_09 AC 78 ms
15,048 KB
testcase_10 AC 346 ms
17,180 KB
testcase_11 AC 347 ms
17,272 KB
testcase_12 AC 346 ms
17,148 KB
testcase_13 AC 348 ms
17,340 KB
testcase_14 AC 354 ms
17,064 KB
testcase_15 AC 336 ms
17,160 KB
testcase_16 AC 338 ms
17,312 KB
testcase_17 AC 340 ms
17,068 KB
testcase_18 AC 80 ms
15,292 KB
testcase_19 AC 80 ms
15,260 KB
testcase_20 AC 80 ms
15,180 KB
testcase_21 AC 79 ms
15,300 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

eval"N,K,*A="+gets(p).split*?,
N.downto(z=0){|i|A.combination(i){|a|n=a.sum
n>K||n>z&&z=n}}
p z
0