結果

問題 No.2424 Josouzai
ユーザー kou_kkkkou_kkk
提出日時 2023-08-24 12:38:43
言語 Nim
(2.0.2)
結果
AC  
実行時間 106 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 4,352 ms
コンパイル使用メモリ 68,776 KB
実行使用メモリ 21,296 KB
最終ジャッジ日時 2023-08-24 12:38:54
合計ジャッジ時間 8,252 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 32 ms
8,564 KB
testcase_05 AC 105 ms
21,296 KB
testcase_06 AC 103 ms
21,224 KB
testcase_07 AC 103 ms
20,892 KB
testcase_08 AC 106 ms
20,452 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 18 ms
8,920 KB
testcase_11 AC 49 ms
20,208 KB
testcase_12 AC 38 ms
15,084 KB
testcase_13 AC 33 ms
8,640 KB
testcase_14 AC 61 ms
14,632 KB
testcase_15 AC 8 ms
4,380 KB
testcase_16 AC 95 ms
20,148 KB
testcase_17 AC 23 ms
6,936 KB
testcase_18 AC 29 ms
8,648 KB
testcase_19 AC 48 ms
11,128 KB
testcase_20 AC 96 ms
19,636 KB
testcase_21 AC 74 ms
15,196 KB
testcase_22 AC 32 ms
8,672 KB
testcase_23 AC 40 ms
9,904 KB
testcase_24 AC 16 ms
5,652 KB
testcase_25 AC 101 ms
19,720 KB
testcase_26 AC 75 ms
15,216 KB
testcase_27 AC 103 ms
20,260 KB
testcase_28 AC 89 ms
18,212 KB
testcase_29 AC 81 ms
16,040 KB
testcase_30 AC 18 ms
6,212 KB
testcase_31 AC 45 ms
10,604 KB
testcase_32 AC 100 ms
20,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import algorithm, sequtils, strutils

var
  k = (stdin.readLine.split)[1].parseInt
  a = stdin.readLine.split.map parseInt
sort a

var cnt = 0
for v in a:
  if k < v: break
  k.dec v
  inc cnt

echo cnt, " ", k
0