結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,056 KB
testcase_01 AC 66 ms
71,492 KB
testcase_02 AC 64 ms
71,392 KB
testcase_03 AC 77 ms
75,512 KB
testcase_04 AC 72 ms
75,584 KB
testcase_05 AC 76 ms
75,472 KB
testcase_06 AC 73 ms
75,612 KB
testcase_07 AC 72 ms
75,588 KB
testcase_08 AC 72 ms
75,428 KB
testcase_09 AC 70 ms
75,264 KB
testcase_10 AC 72 ms
75,264 KB
testcase_11 AC 69 ms
75,504 KB
testcase_12 AC 73 ms
75,500 KB
testcase_13 AC 71 ms
75,364 KB
testcase_14 AC 68 ms
71,220 KB
testcase_15 AC 66 ms
71,220 KB
testcase_16 AC 76 ms
75,544 KB
testcase_17 AC 74 ms
75,564 KB
testcase_18 AC 72 ms
75,372 KB
testcase_19 AC 77 ms
75,476 KB
testcase_20 WA -
testcase_21 AC 67 ms
71,420 KB
testcase_22 AC 67 ms
71,220 KB
testcase_23 AC 68 ms
71,256 KB
testcase_24 AC 66 ms
71,220 KB
testcase_25 AC 67 ms
71,540 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 73 ms
75,360 KB
testcase_30 AC 72 ms
75,504 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])
    elif L == int(W[i]):
        print(i+1)
        break
    else:
        print(i)
        break
0