結果

問題 No.2424 Josouzai
ユーザー SchneeSchnee
提出日時 2024-04-28 04:16:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 159 ms / 2,000 ms
コード長 115 bytes
コンパイル時間 753 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 32,628 KB
最終ジャッジ日時 2024-04-28 04:16:40
合計ジャッジ時間 4,471 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
10,624 KB
testcase_01 AC 27 ms
10,752 KB
testcase_02 AC 28 ms
10,752 KB
testcase_03 AC 28 ms
10,752 KB
testcase_04 AC 54 ms
17,352 KB
testcase_05 AC 136 ms
32,628 KB
testcase_06 AC 136 ms
32,352 KB
testcase_07 AC 138 ms
32,348 KB
testcase_08 AC 159 ms
32,584 KB
testcase_09 AC 27 ms
10,624 KB
testcase_10 AC 46 ms
16,372 KB
testcase_11 AC 80 ms
27,632 KB
testcase_12 AC 65 ms
23,192 KB
testcase_13 AC 54 ms
17,340 KB
testcase_14 AC 82 ms
22,572 KB
testcase_15 AC 32 ms
12,416 KB
testcase_16 AC 119 ms
29,792 KB
testcase_17 AC 47 ms
15,588 KB
testcase_18 AC 51 ms
16,556 KB
testcase_19 AC 73 ms
20,812 KB
testcase_20 AC 123 ms
30,384 KB
testcase_21 AC 94 ms
25,800 KB
testcase_22 AC 56 ms
17,284 KB
testcase_23 AC 73 ms
18,692 KB
testcase_24 AC 43 ms
14,200 KB
testcase_25 AC 124 ms
31,488 KB
testcase_26 AC 98 ms
25,460 KB
testcase_27 AC 129 ms
32,088 KB
testcase_28 AC 117 ms
29,032 KB
testcase_29 AC 103 ms
27,276 KB
testcase_30 AC 42 ms
14,516 KB
testcase_31 AC 70 ms
20,156 KB
testcase_32 AC 127 ms
31,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

k=int(input().split()[1])
a=sorted(map(int,input().split()))
i=0
while k>a[i]:k-=a[i];i+=1
b=k==a[i]
print(i+b,k-b)
0