結果
| 問題 | 
                            No.5 数字のブロック
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2017-03-07 18:40:25 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 266 bytes | 
| コンパイル時間 | 248 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 11,392 KB | 
| 最終ジャッジ日時 | 2024-06-23 17:18:15 | 
| 合計ジャッジ時間 | 2,272 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 13 WA * 21 | 
ソースコード
a = input()
b = input()
c = input().split()
c.sort()
sums = 0
count = 0
for i in c:
    i = int(i)
    sums += i
    if sums < int(a):
        count += 1
        continue
    elif sums == int(a):
        count += 1
        break
    else:
        break
print(count)