結果
問題 |
No.5 数字のブロック
|
ユーザー |
![]() |
提出日時 | 2016-11-27 15:39:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 434 bytes |
コンパイル時間 | 78 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,648 KB |
最終ジャッジ日時 | 2024-11-27 12:11:02 |
合計ジャッジ時間 | 2,164 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 34 |
ソースコード
# -*- 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)+i < a: y.append(int(i)) sum(y) print(y) else: ans = len(y) if ans > b: print("error") else: print(ans) print(y) pass if __name__ == "__main__": main()