結果
問題 | No.79 過小評価ダメ・ゼッタイ |
ユーザー | javy |
提出日時 | 2015-12-07 03:18:58 |
言語 | Kotlin (1.9.23) |
結果 |
AC
|
実行時間 | 479 ms / 5,000 ms |
コード長 | 1,465 bytes |
コンパイル時間 | 13,967 ms |
コンパイル使用メモリ | 420,572 KB |
実行使用メモリ | 57,836 KB |
最終ジャッジ日時 | 2023-08-12 17:00:25 |
合計ジャッジ時間 | 25,391 ms |
ジャッジサーバーID (参考情報) |
judge8 / judge2 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 332 ms
53,068 KB |
testcase_01 | AC | 474 ms
57,784 KB |
testcase_02 | AC | 291 ms
52,868 KB |
testcase_03 | AC | 291 ms
52,644 KB |
testcase_04 | AC | 293 ms
52,656 KB |
testcase_05 | AC | 479 ms
57,760 KB |
testcase_06 | AC | 294 ms
52,996 KB |
testcase_07 | AC | 292 ms
52,840 KB |
testcase_08 | AC | 291 ms
53,132 KB |
testcase_09 | AC | 291 ms
52,872 KB |
testcase_10 | AC | 293 ms
53,040 KB |
testcase_11 | AC | 293 ms
52,824 KB |
testcase_12 | AC | 289 ms
52,784 KB |
testcase_13 | AC | 294 ms
53,096 KB |
testcase_14 | AC | 462 ms
57,600 KB |
testcase_15 | AC | 394 ms
56,028 KB |
testcase_16 | AC | 464 ms
57,652 KB |
testcase_17 | AC | 387 ms
55,744 KB |
testcase_18 | AC | 470 ms
57,660 KB |
testcase_19 | AC | 454 ms
57,604 KB |
testcase_20 | AC | 472 ms
57,656 KB |
testcase_21 | AC | 308 ms
53,024 KB |
testcase_22 | AC | 402 ms
56,084 KB |
testcase_23 | AC | 472 ms
57,604 KB |
testcase_24 | AC | 472 ms
57,836 KB |
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used fun main(args: Array<String>) { ^ Main.kt:47:9: warning: variable 'num' is never used val num = readLineInt() ^
ソースコード
package Yukicoder fun main(args: Array<String>) { fun readLineLongArray(): List<Long> { val str = readLine() as String val arrStr = str.split(" ") val ret = arrStr.map { it.toLong() } return ret } fun readLineLong(): Long { val str = readLine() as String return str.toLong() } fun readLineInt(): Int { val str = readLine() as String return str.toInt() } fun readLineIntArray() : List<Int> { val str = readLine() as String val arrStr = str.split(" ") val ret = arrStr.map { it.toInt() } return ret } fun readLineDoubleArray(): List<Double> { val str = readLine() as String val arrStr = str.split(" ") val ret = arrStr.map { it.toDouble() } return ret } fun readLineDouble() : Double { val str = readLine() as String return str.toDouble() } // fun readLineStringArray(): List<String> { // val str = readLine() as String // val arrStr = str.split(" ") // return arrStr // } val num = readLineInt() val input = readLineIntArray() var arr = Array(6 , {0}) for (item in input) { arr[item-1]++ } var maxNum = Integer.MIN_VALUE var maxIndex = -1 for ((i, item) in arr.withIndex()) { if (item >= maxNum) { maxIndex = i+1 maxNum = item } } println(maxIndex) }