結果

問題 No.5 数字のブロック
ユーザー mkawa2mkawa2
提出日時 2020-01-15 08:47:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 840 bytes
コンパイル時間 1,003 ms
コンパイル使用メモリ 10,952 KB
実行使用メモリ 9,828 KB
最終ジャッジ日時 2023-08-29 03:29:12
合計ジャッジ時間 4,750 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,640 KB
testcase_01 AC 19 ms
8,696 KB
testcase_02 WA -
testcase_03 AC 22 ms
9,336 KB
testcase_04 AC 22 ms
9,028 KB
testcase_05 AC 23 ms
9,536 KB
testcase_06 AC 22 ms
9,260 KB
testcase_07 AC 21 ms
9,020 KB
testcase_08 AC 22 ms
9,216 KB
testcase_09 AC 20 ms
8,876 KB
testcase_10 AC 23 ms
9,616 KB
testcase_11 AC 22 ms
9,056 KB
testcase_12 AC 23 ms
9,404 KB
testcase_13 AC 22 ms
9,500 KB
testcase_14 AC 20 ms
8,628 KB
testcase_15 AC 20 ms
8,668 KB
testcase_16 AC 24 ms
9,536 KB
testcase_17 AC 24 ms
9,644 KB
testcase_18 AC 23 ms
9,620 KB
testcase_19 AC 24 ms
9,828 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 19 ms
8,612 KB
testcase_24 AC 18 ms
8,572 KB
testcase_25 AC 20 ms
8,628 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 21 ms
9,100 KB
testcase_30 AC 19 ms
8,860 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10 ** 6)
from bisect import *
from collections import *
from heapq import *


int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
def MF(): return map(float, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LF(): return list(map(float, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
dij = [(0, 1), (1, 0), (0, -1), (-1, 0)]

def main():
    l=II()
    n=II()
    ww=LI()
    ww.sort()
    s=0
    for i,w in enumerate(ww):
        s+=w
        if s>l:break
    print(i)

main()
0