結果

問題 No.2424 Josouzai
ユーザー 👑 tatt61880tatt61880
提出日時 2023-08-21 00:08:56
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 317 bytes
コンパイル時間 3,050 ms
コンパイル使用メモリ 149,888 KB
実行使用メモリ 5,064 KB
最終ジャッジ日時 2023-08-21 00:09:07
合計ジャッジ時間 10,684 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 37 ms
4,376 KB
testcase_05 AC 123 ms
5,040 KB
testcase_06 AC 119 ms
4,988 KB
testcase_07 AC 118 ms
4,988 KB
testcase_08 AC 123 ms
5,044 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 29 ms
4,380 KB
testcase_11 AC 82 ms
4,864 KB
testcase_12 AC 62 ms
4,560 KB
testcase_13 AC 38 ms
4,380 KB
testcase_14 AC 67 ms
4,532 KB
testcase_15 AC 11 ms
4,380 KB
testcase_16 AC 107 ms
5,016 KB
testcase_17 AC 28 ms
4,376 KB
testcase_18 AC 34 ms
4,380 KB
testcase_19 AC 56 ms
4,384 KB
testcase_20 AC 108 ms
4,892 KB
testcase_21 AC 82 ms
4,408 KB
testcase_22 AC 37 ms
4,380 KB
testcase_23 AC 45 ms
4,384 KB
testcase_24 AC 21 ms
4,380 KB
testcase_25 AC 115 ms
5,064 KB
testcase_26 AC 82 ms
4,540 KB
testcase_27 AC 118 ms
4,888 KB
testcase_28 AC 100 ms
4,672 KB
testcase_29 AC 89 ms
4,596 KB
testcase_30 AC 22 ms
4,380 KB
testcase_31 AC 53 ms
4,380 KB
testcase_32 AC 117 ms
5,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var n: int :: cui@inputInt()
	var k: int :: cui@inputInt()
	var a: []int :: #[n]int
	for i(0, n - 1)
		do a[i] :: cui@inputInt()
	end for
	do a.sort()
	
	var ans: int :: 0
	for i(0, n - 1)
		if(a[i] > k)
			break i
		end if
		do k :- a[i]
		do ans :+ 1
	end for
	
	do cui@print("\{ans} \{k}\n")
end func
0