結果
問題 | No.5 数字のブロック |
ユーザー | machoniump |
提出日時 | 2021-03-01 18:15:41 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 50 ms / 5,000 ms |
コード長 | 928 bytes |
コンパイル時間 | 101 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 12,544 KB |
最終ジャッジ日時 | 2024-04-14 03:46:21 |
合計ジャッジ時間 | 3,387 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 41 ms
11,520 KB |
testcase_01 | AC | 43 ms
11,520 KB |
testcase_02 | AC | 39 ms
11,520 KB |
testcase_03 | AC | 50 ms
12,416 KB |
testcase_04 | AC | 43 ms
11,904 KB |
testcase_05 | AC | 47 ms
12,288 KB |
testcase_06 | AC | 45 ms
12,032 KB |
testcase_07 | AC | 43 ms
11,904 KB |
testcase_08 | AC | 43 ms
12,032 KB |
testcase_09 | AC | 42 ms
11,904 KB |
testcase_10 | AC | 45 ms
12,544 KB |
testcase_11 | AC | 42 ms
11,904 KB |
testcase_12 | AC | 47 ms
12,160 KB |
testcase_13 | AC | 47 ms
12,416 KB |
testcase_14 | AC | 42 ms
11,520 KB |
testcase_15 | AC | 44 ms
11,520 KB |
testcase_16 | AC | 47 ms
12,288 KB |
testcase_17 | AC | 48 ms
12,416 KB |
testcase_18 | AC | 48 ms
12,416 KB |
testcase_19 | AC | 49 ms
12,544 KB |
testcase_20 | AC | 44 ms
11,520 KB |
testcase_21 | AC | 41 ms
11,520 KB |
testcase_22 | AC | 43 ms
11,648 KB |
testcase_23 | AC | 42 ms
11,520 KB |
testcase_24 | AC | 42 ms
11,648 KB |
testcase_25 | AC | 41 ms
11,520 KB |
testcase_26 | AC | 42 ms
11,648 KB |
testcase_27 | AC | 41 ms
11,520 KB |
testcase_28 | AC | 42 ms
11,520 KB |
testcase_29 | AC | 43 ms
12,032 KB |
testcase_30 | AC | 45 ms
11,904 KB |
testcase_31 | AC | 46 ms
11,520 KB |
testcase_32 | AC | 43 ms
11,520 KB |
testcase_33 | AC | 41 ms
11,520 KB |
ソースコード
# import sys from collections import deque, defaultdict from copy import deepcopy from bisect import bisect_left, bisect_right, insort_left, insort_right from heapq import heapify, heappop, heappush from itertools import product, permutations, combinations, combinations_with_replacement from functools import reduce from math import gcd, sin, cos, tan, asin, acos, atan, degrees, radians, ceil, floor, log, sqrt from math import pi as PI from decimal import Decimal # sys.setrecursionlimit(10**6) INF = 10**18 MOD = 10**9+7 # MOD = 998244353 yes="Yes" no="No" from math import ceil def II():return int(input()) def SI():return str(input()) def MI():return map(int,input().split()) def MS():return map(str,input().split()) def LI():return list(map(int,input().split())) def LS():return list(map(str,input().split())) l=II() n=II() w=sorted(LI()) cnt=0 for i in range(n): if l>=w[i]: l-=w[i] cnt+=1 print(cnt)