結果
問題 |
No.5 数字のブロック
|
ユーザー |
![]() |
提出日時 | 2020-05-03 21:49:41 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 243 bytes |
コンパイル時間 | 251 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 61,508 KB |
最終ジャッジ日時 | 2024-06-23 02:16:52 |
合計ジャッジ時間 | 2,600 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 WA * 20 |
ソースコード
import sys input = sys.stdin.buffer.readline L = int(input()) N = int(input()) Ws = sorted(list(map(int, input().split()))) s = 0 cnt = 0 while True: s += Ws[cnt] cnt += 1 if s >= L or cnt >= N: break print(cnt)