結果

問題 No.504 ゲーム大会(ランキング)
ユーザー akko_yukkyakko_yukky
提出日時 2017-05-11 12:31:58
言語 Ruby
(3.3.0)
結果
AC  
実行時間 215 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 205 ms
コンパイル使用メモリ 11,436 KB
実行使用メモリ 24,412 KB
最終ジャッジ日時 2023-10-13 11:02:05
合計ジャッジ時間 3,512 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,260 KB
testcase_01 AC 85 ms
15,208 KB
testcase_02 AC 81 ms
15,312 KB
testcase_03 AC 82 ms
15,104 KB
testcase_04 AC 80 ms
15,044 KB
testcase_05 AC 81 ms
15,084 KB
testcase_06 AC 80 ms
15,068 KB
testcase_07 AC 212 ms
24,192 KB
testcase_08 AC 212 ms
24,188 KB
testcase_09 AC 214 ms
24,244 KB
testcase_10 AC 213 ms
24,412 KB
testcase_11 AC 214 ms
24,104 KB
testcase_12 AC 213 ms
23,884 KB
testcase_13 AC 208 ms
24,004 KB
testcase_14 AC 215 ms
24,208 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
scores = $stdin.read.split(?\n).map(&:to_i)
rank = 1 

puts rank
for i in 1..n-1 
    if scores[0] < scores[i]
      rank += 1
    end 
  puts rank
end
0