結果
問題 | No.617 Nafmo、買い出しに行く |
ユーザー |
![]() |
提出日時 | 2021-05-24 13:17:58 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 226 bytes |
コンパイル時間 | 107 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 17,444 KB |
最終ジャッジ日時 | 2024-10-12 21:22:39 |
合計ジャッジ時間 | 4,767 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 2 |
other | AC * 6 TLE * 1 -- * 13 |
ソースコード
n,k=map(int,input().split()) item=[int(input()) for _ in range(n)] ans=0 for i in range(2**n): cnt=0 for j in range(n): if ((i>>j)&1): cnt+=item[j] if cnt<=k: ans=max(ans,cnt) print(ans)