結果
問題 | No.5 数字のブロック |
ユーザー | qib |
提出日時 | 2023-03-21 00:08:51 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 49 ms / 5,000 ms |
コード長 | 175 bytes |
コンパイル時間 | 163 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 59,648 KB |
最終ジャッジ日時 | 2024-09-18 14:12:09 |
合計ジャッジ時間 | 2,885 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 34 |
ソースコード
l = int(input()) n = int(input()) w = list(map(int, input().split())) w.sort() cnt = 0 for i in range(n): if cnt + w[i] > l: print(i) exit() cnt += w[i] print(n)