結果

問題 No.504 ゲーム大会(ランキング)
ユーザー sei0osei0o
提出日時 2017-05-19 17:47:49
言語 Ruby
(3.2.2)
結果
RE  
実行時間 -
コード長 160 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 11,888 KB
実行使用メモリ 16,108 KB
最終ジャッジ日時 2023-10-19 02:48:52
合計ジャッジ時間 2,401 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 88 ms
16,056 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 AC 89 ms
16,056 KB
testcase_05 AC 88 ms
16,052 KB
testcase_06 AC 88 ms
16,056 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
k = gets.to_i
scores = []
puts 1
(n-1).times do |i|
  scores << gets.to_i
  scores = scores.sort { |a, b| b - a }

  puts scores.index(k) + 1
end
0