結果

問題 No.504 ゲーム大会(ランキング)
ユーザー R_FR_F
提出日時 2017-12-13 14:03:52
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 1,225 ms / 2,000 ms
コード長 456 bytes
コンパイル時間 11,304 ms
コンパイル使用メモリ 421,480 KB
実行使用メモリ 64,880 KB
最終ジャッジ日時 2023-08-12 21:34:26
合計ジャッジ時間 24,594 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 306 ms
53,612 KB
testcase_01 AC 304 ms
53,668 KB
testcase_02 AC 303 ms
53,684 KB
testcase_03 AC 301 ms
53,780 KB
testcase_04 AC 299 ms
53,780 KB
testcase_05 AC 298 ms
53,932 KB
testcase_06 AC 300 ms
53,600 KB
testcase_07 AC 1,177 ms
63,652 KB
testcase_08 AC 1,225 ms
63,880 KB
testcase_09 AC 1,180 ms
63,828 KB
testcase_10 AC 1,187 ms
63,964 KB
testcase_11 AC 1,211 ms
63,840 KB
testcase_12 AC 1,174 ms
64,880 KB
testcase_13 AC 1,081 ms
64,132 KB
testcase_14 AC 1,197 ms
63,940 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:21:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

import java.util.Scanner

class No504() {
	private var input = Scanner(System. `in`)
	private var testCase = input.nextInt()
	private var rank = 1
	private var kScore = input.nextInt()

	fun ranking() {
		for (i in 1..this.testCase - 1) currentRanking()
		println(this.rank)
	}

	fun currentRanking() {
		println(this.rank)
		if (this.input.nextInt() > this.kScore) this.rank++
	}

}

fun main(args: Array<String>) {
	var no504 = No504()
	no504.ranking()
}
0