結果

問題 No.24 数当てゲーム
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2018-09-28 20:16:48
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 291 ms / 5,000 ms
コード長 301 bytes
コンパイル時間 10,251 ms
コンパイル使用メモリ 440,328 KB
実行使用メモリ 60,456 KB
最終ジャッジ日時 2024-04-30 19:19:36
合計ジャッジ時間 13,900 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 275 ms
60,324 KB
testcase_01 AC 278 ms
60,456 KB
testcase_02 AC 283 ms
60,380 KB
testcase_03 AC 284 ms
60,200 KB
testcase_04 AC 283 ms
60,412 KB
testcase_05 AC 285 ms
60,412 KB
testcase_06 AC 286 ms
60,404 KB
testcase_07 AC 291 ms
60,208 KB
testcase_08 AC 278 ms
60,284 KB
testcase_09 AC 282 ms
60,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

fun main(args: Array<String>) {
	val n = readLine()!!.toInt()
	val dic = MutableList(10) { 1 }

	for (i in 0 until n) {
		val input = readLine()!!.split(" ")
		for (j in 0 until 4) {
			dic[input[j].toInt()] *= listOf(0, 2)[if (input.last() == "NO") 0 else 1]
		}
	}
	println(dic.indexOf(dic.max()))
}
0