結果
問題 |
No.5 数字のブロック
|
ユーザー |
|
提出日時 | 2016-08-13 10:45:33 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 19 ms / 5,000 ms |
コード長 | 342 bytes |
コンパイル時間 | 175 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 7,168 KB |
最終ジャッジ日時 | 2024-11-18 08:49:51 |
合計ジャッジ時間 | 1,604 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 34 |
ソースコード
#!/usr/bin/python # -*- coding: utf-8 -*- #A, B = map(int, raw_input().split()) #S = raw_input() L = int(raw_input()) n = raw_input() array = map(int, raw_input().split()) ### sum = 0 n = 0 array.sort() for i in array: sum += i if sum > L: print n break else: n += 1 else: print n