結果

問題 No.2424 Josouzai
ユーザー 転生チートなし転生チートなし
提出日時 2024-10-14 20:51:45
言語 Go
(1.22.1)
結果
TLE  
実行時間 -
コード長 236 bytes
コンパイル時間 15,036 ms
コンパイル使用メモリ 223,252 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2024-10-14 20:52:37
合計ジャッジ時間 49,575 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,248 KB
testcase_02 AC 1 ms
5,248 KB
testcase_03 AC 1 ms
5,248 KB
testcase_04 AC 569 ms
5,760 KB
testcase_05 TLE -
testcase_06 AC 1,828 ms
6,272 KB
testcase_07 AC 1,809 ms
6,272 KB
testcase_08 AC 1,998 ms
6,272 KB
testcase_09 AC 1 ms
5,248 KB
testcase_10 AC 505 ms
5,760 KB
testcase_11 AC 1,518 ms
6,272 KB
testcase_12 AC 1,118 ms
6,144 KB
testcase_13 AC 624 ms
6,016 KB
testcase_14 AC 1,057 ms
6,144 KB
testcase_15 AC 164 ms
5,248 KB
testcase_16 AC 1,783 ms
6,272 KB
testcase_17 AC 470 ms
5,248 KB
testcase_18 AC 558 ms
5,632 KB
testcase_19 AC 987 ms
6,016 KB
testcase_20 AC 1,775 ms
6,272 KB
testcase_21 AC 1,355 ms
6,272 KB
testcase_22 AC 583 ms
6,016 KB
testcase_23 AC 748 ms
6,016 KB
testcase_24 AC 317 ms
5,248 KB
testcase_25 AC 1,893 ms
6,272 KB
testcase_26 AC 1,384 ms
6,272 KB
testcase_27 AC 1,935 ms
6,400 KB
testcase_28 AC 1,678 ms
6,272 KB
testcase_29 AC 1,480 ms
6,272 KB
testcase_30 AC 364 ms
5,248 KB
testcase_31 AC 885 ms
6,016 KB
testcase_32 AC 1,930 ms
6,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import . "fmt"
import . "sort"

func main() {
	var n,k int
	Scan(&n,&k)
	aa:=make([]int,n,n)
	for i:=range aa {
		Scan(&aa[i])
	}
	Ints(aa)
	c:=0
	for _,a:=range aa {
		if a>k {
			break
		}
		c++
		k-=a
	}
	Println(c,k)
}
0