結果
| 問題 | No.617 Nafmo、買い出しに行く | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-12-23 11:38:15 | 
| 言語 | Python2 (2.7.18) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 747 ms / 2,000 ms | 
| コード長 | 237 bytes | 
| コンパイル時間 | 320 ms | 
| コンパイル使用メモリ | 6,944 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-12-17 16:27:28 | 
| 合計ジャッジ時間 | 7,105 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 20 | 
ソースコード
#yuki_617 import itertools n,k=map(int,raw_input().split()) a=[] for i in xrange(n): a.append(int(raw_input())) res=0 for i in xrange(1,n+1): c=itertools.combinations(a,i) for j in c: if sum(j)<=k: res=max(sum(j),res) print res
