結果

問題 No.5 数字のブロック
ユーザー 夕日夕日
提出日時 2021-06-24 16:46:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 238 bytes
コンパイル時間 466 ms
コンパイル使用メモリ 87,064 KB
実行使用メモリ 75,696 KB
最終ジャッジ日時 2023-09-07 13:24:56
合計ジャッジ時間 4,422 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,216 KB
testcase_01 AC 70 ms
71,520 KB
testcase_02 WA -
testcase_03 AC 78 ms
75,556 KB
testcase_04 AC 78 ms
75,524 KB
testcase_05 AC 82 ms
75,520 KB
testcase_06 AC 76 ms
75,328 KB
testcase_07 AC 76 ms
75,472 KB
testcase_08 AC 76 ms
75,324 KB
testcase_09 AC 74 ms
75,480 KB
testcase_10 AC 79 ms
75,544 KB
testcase_11 AC 77 ms
75,516 KB
testcase_12 AC 83 ms
75,512 KB
testcase_13 AC 80 ms
75,652 KB
testcase_14 AC 71 ms
71,328 KB
testcase_15 AC 70 ms
71,272 KB
testcase_16 AC 80 ms
75,384 KB
testcase_17 AC 82 ms
75,336 KB
testcase_18 AC 80 ms
75,552 KB
testcase_19 AC 81 ms
75,684 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 73 ms
71,116 KB
testcase_24 AC 73 ms
71,348 KB
testcase_25 AC 73 ms
71,252 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 77 ms
75,696 KB
testcase_30 AC 75 ms
75,476 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

L=int(input())
N=int(input())
W = input().split()
W.sort(key=int)
for i in range(N):
    if L >= int(W[i]):
        L -= int(W[i])
        if N == i-1:
            print(i+1)
            break
    
    else:
        print(i)
        break
0