結果

問題 No.2424 Josouzai
ユーザー 👑 tatt61880tatt61880
提出日時 2023-08-21 00:08:56
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 317 bytes
コンパイル時間 7,930 ms
コンパイル使用メモリ 146,696 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-08 05:51:35
合計ジャッジ時間 12,155 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,248 KB
testcase_02 AC 2 ms
5,248 KB
testcase_03 AC 1 ms
5,248 KB
testcase_04 AC 34 ms
5,376 KB
testcase_05 AC 113 ms
5,376 KB
testcase_06 AC 108 ms
5,376 KB
testcase_07 AC 112 ms
5,376 KB
testcase_08 AC 114 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 27 ms
5,376 KB
testcase_11 AC 76 ms
5,376 KB
testcase_12 AC 57 ms
5,376 KB
testcase_13 AC 34 ms
5,376 KB
testcase_14 AC 60 ms
5,376 KB
testcase_15 AC 11 ms
5,376 KB
testcase_16 AC 99 ms
5,376 KB
testcase_17 AC 27 ms
5,376 KB
testcase_18 AC 30 ms
5,376 KB
testcase_19 AC 54 ms
5,376 KB
testcase_20 AC 100 ms
5,376 KB
testcase_21 AC 76 ms
5,376 KB
testcase_22 AC 33 ms
5,376 KB
testcase_23 AC 41 ms
5,376 KB
testcase_24 AC 18 ms
5,376 KB
testcase_25 AC 117 ms
5,376 KB
testcase_26 AC 80 ms
5,376 KB
testcase_27 AC 119 ms
5,376 KB
testcase_28 AC 97 ms
5,376 KB
testcase_29 AC 85 ms
5,376 KB
testcase_30 AC 21 ms
5,376 KB
testcase_31 AC 51 ms
5,376 KB
testcase_32 AC 108 ms
5,376 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