結果
問題 | No.5 数字のブロック |
ユーザー | AkioSuzuta |
提出日時 | 2020-06-06 00:07:43 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 5,000 ms |
コード長 | 307 bytes |
コンパイル時間 | 322 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,648 KB |
最終ジャッジ日時 | 2024-12-17 19:40:08 |
合計ジャッジ時間 | 2,447 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 34 |
ソースコード
# Problem 5 - 数字のブロック # input L = int(input()) N = int(input()) w_nums = list(map(int, input().split())) # initialization w_nums = sorted(w_nums) count = 0 w_sum = 0 for i in range(N): w_sum += w_nums[i] if w_sum>L: break else: count += 1 # output print(count)