結果

問題 No.2424 Josouzai
ユーザー noriocnorioc
提出日時 2023-08-18 22:34:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 162 ms / 2,000 ms
コード長 191 bytes
コンパイル時間 398 ms
コンパイル使用メモリ 87,024 KB
実行使用メモリ 104,780 KB
最終ジャッジ日時 2023-08-18 22:34:57
合計ジャッジ時間 6,077 ms
ジャッジサーバーID
(参考情報)
judge9 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,212 KB
testcase_01 AC 73 ms
71,448 KB
testcase_02 AC 73 ms
71,156 KB
testcase_03 AC 73 ms
71,380 KB
testcase_04 AC 105 ms
84,900 KB
testcase_05 AC 160 ms
102,816 KB
testcase_06 AC 158 ms
102,412 KB
testcase_07 AC 162 ms
102,852 KB
testcase_08 AC 159 ms
102,820 KB
testcase_09 AC 72 ms
71,236 KB
testcase_10 AC 87 ms
83,892 KB
testcase_11 AC 112 ms
104,780 KB
testcase_12 AC 102 ms
97,728 KB
testcase_13 AC 98 ms
84,500 KB
testcase_14 AC 114 ms
93,948 KB
testcase_15 AC 79 ms
76,416 KB
testcase_16 AC 147 ms
99,608 KB
testcase_17 AC 90 ms
81,604 KB
testcase_18 AC 94 ms
83,284 KB
testcase_19 AC 108 ms
91,516 KB
testcase_20 AC 149 ms
99,620 KB
testcase_21 AC 126 ms
99,296 KB
testcase_22 AC 101 ms
84,360 KB
testcase_23 AC 103 ms
87,620 KB
testcase_24 AC 86 ms
79,284 KB
testcase_25 AC 153 ms
101,656 KB
testcase_26 AC 123 ms
99,444 KB
testcase_27 AC 155 ms
101,884 KB
testcase_28 AC 136 ms
103,116 KB
testcase_29 AC 128 ms
102,796 KB
testcase_30 AC 86 ms
79,656 KB
testcase_31 AC 111 ms
89,800 KB
testcase_32 AC 156 ms
101,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
A = list(map(int, input().split()))

k = K
for i, a in enumerate(sorted(A)):
    if k < a:
        print(i, k)
        break
    k -= a
else:
    print(N, k)
0