結果
問題 | No.182 新規性の虜 |
ユーザー | javy |
提出日時 | 2015-12-07 01:55:12 |
言語 | Kotlin (1.9.23) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,530 bytes |
コンパイル時間 | 12,019 ms |
コンパイル使用メモリ | 426,968 KB |
実行使用メモリ | 64,836 KB |
最終ジャッジ日時 | 2024-11-20 06:29:48 |
合計ジャッジ時間 | 25,992 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 321 ms
51,864 KB |
testcase_01 | AC | 315 ms
51,892 KB |
testcase_02 | AC | 315 ms
51,824 KB |
testcase_03 | AC | 326 ms
51,796 KB |
testcase_04 | AC | 318 ms
51,888 KB |
testcase_05 | AC | 324 ms
51,940 KB |
testcase_06 | AC | 319 ms
51,636 KB |
testcase_07 | AC | 327 ms
51,640 KB |
testcase_08 | AC | 505 ms
60,608 KB |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 318 ms
51,792 KB |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | AC | 319 ms
51,888 KB |
testcase_24 | AC | 522 ms
63,636 KB |
testcase_25 | AC | 499 ms
61,440 KB |
testcase_26 | AC | 488 ms
55,580 KB |
testcase_27 | AC | 317 ms
51,804 KB |
evil01.txt | AC | 530 ms
66,216 KB |
evil02.txt | AC | 530 ms
66,124 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() ^ Main.kt:52:9: warning: variable 'tmp' is assigned but never accessed var tmp = Integer.MIN_VALUE ^ Main.kt:60:13: warning: the value 'item' assigned to 'var tmp: Int defined in Yukicoder.main' is never used tmp = item ^
ソースコード
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 arrInt = readLineIntArray() var count = 0 var tmpCount = 0 var tmp = Integer.MIN_VALUE for (item in arrInt) { if (tmpCount != item) { if (tmpCount == 1) { count++ } tmpCount = 1 tmp = item } else { tmpCount++ } } if (tmpCount == 1) count++ println(count) }