結果

問題 No.504 ゲーム大会(ランキング)
ユーザー simansiman
提出日時 2020-07-31 01:58:27
言語 Ruby
(3.2.2)
結果
AC  
実行時間 221 ms / 2,000 ms
コード長 144 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 11,260 KB
実行使用メモリ 16,552 KB
最終ジャッジ日時 2023-09-18 13:43:44
合計ジャッジ時間 3,388 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
15,152 KB
testcase_01 AC 78 ms
15,220 KB
testcase_02 AC 86 ms
15,296 KB
testcase_03 AC 81 ms
15,168 KB
testcase_04 AC 77 ms
15,236 KB
testcase_05 AC 77 ms
15,116 KB
testcase_06 AC 78 ms
15,044 KB
testcase_07 AC 221 ms
16,320 KB
testcase_08 AC 220 ms
16,332 KB
testcase_09 AC 221 ms
16,408 KB
testcase_10 AC 218 ms
16,264 KB
testcase_11 AC 220 ms
16,484 KB
testcase_12 AC 213 ms
16,552 KB
testcase_13 AC 211 ms
16,480 KB
testcase_14 AC 218 ms
16,428 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
A = N.times.map { gets.to_i }

rank = 1
score = A.first

A[0..-1].each do |a|
  if score < a
    rank += 1
  end

  puts rank
end
0