結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,624 KB
testcase_01 AC 29 ms
10,624 KB
testcase_02 AC 29 ms
10,752 KB
testcase_03 AC 30 ms
10,496 KB
testcase_04 AC 65 ms
17,232 KB
testcase_05 AC 155 ms
32,512 KB
testcase_06 AC 153 ms
32,232 KB
testcase_07 AC 162 ms
32,228 KB
testcase_08 AC 156 ms
32,516 KB
testcase_09 AC 30 ms
10,624 KB
testcase_10 AC 50 ms
16,512 KB
testcase_11 AC 90 ms
27,516 KB
testcase_12 AC 75 ms
23,072 KB
testcase_13 AC 65 ms
17,192 KB
testcase_14 AC 94 ms
22,576 KB
testcase_15 AC 39 ms
12,416 KB
testcase_16 AC 139 ms
29,676 KB
testcase_17 AC 57 ms
15,464 KB
testcase_18 AC 60 ms
16,564 KB
testcase_19 AC 84 ms
20,700 KB
testcase_20 AC 138 ms
30,260 KB
testcase_21 AC 111 ms
25,668 KB
testcase_22 AC 62 ms
17,280 KB
testcase_23 AC 73 ms
18,568 KB
testcase_24 AC 47 ms
14,328 KB
testcase_25 AC 143 ms
31,492 KB
testcase_26 AC 113 ms
25,336 KB
testcase_27 AC 152 ms
31,836 KB
testcase_28 AC 131 ms
29,036 KB
testcase_29 AC 124 ms
27,104 KB
testcase_30 AC 49 ms
14,520 KB
testcase_31 AC 83 ms
20,064 KB
testcase_32 AC 153 ms
31,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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