結果
問題 | No.5 数字のブロック |
ユーザー |
![]() |
提出日時 | 2023-12-31 03:55:18 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 46 ms / 5,000 ms |
コード長 | 155 bytes |
コンパイル時間 | 235 ms |
コンパイル使用メモリ | 82,384 KB |
実行使用メモリ | 62,392 KB |
最終ジャッジ日時 | 2024-09-27 17:00:57 |
合計ジャッジ時間 | 2,854 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 34 |
ソースコード
l=int(input()) n=int(input()) w=list(map(int,input().split())) w.sort() ans=0 for i in range(n): if l>=w[i]: l-=w[i] ans+=1 print(ans)