結果
問題 |
No.5 数字のブロック
|
ユーザー |
![]() |
提出日時 | 2016-11-27 15:29:49 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 398 bytes |
コンパイル時間 | 139 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,776 KB |
最終ジャッジ日時 | 2024-11-27 12:10:51 |
合計ジャッジ時間 | 2,208 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 WA * 24 |
ソースコード
# -*- coding: utf-8 -*- def main(): a = int(input()) b = int(input()) c = [int(x) for x in input().split()] c.sort() y = [] for i in c: if sum(y) <= a: y.append(int(i)) sum(y) else: ans = len(y) if ans > b: print("error") else: print(ans) pass if __name__ == "__main__": main()