結果

問題 No.504 ゲーム大会(ランキング)
コンテスト
ユーザー 💕💖💞
提出日時 2017-06-24 18:50:21
言語 Kotlin
(2.3.20)
コンパイル:
kotlinc _filename_ -include-runtime -d main.jar
実行:
kotlin main.jar
結果
AC  
実行時間 582 ms / 2,000 ms
コード長 344 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 9,408 ms
コンパイル使用メモリ 453,448 KB
実行使用メモリ 78,196 KB
最終ジャッジ日時 2026-05-14 12:42:08
合計ジャッジ時間 16,209 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

fun main(args : Array<String>) {
  val n = readLine()!!.toInt()
  var head = readLine()!!.toInt()
  var rank = 1
  println(rank)
  val scores = (2..n).map {
    readLine()!!.toInt()
  }
  scores.map { score ->
    when  {
      score > head  -> {
        rank += 1
        head  = head
      }
      else -> null
    }
    println( rank )
  }
}
0