結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー komkomhkomkomh
提出日時 2019-06-20 10:18:44
言語 Kotlin
(1.9.10)
結果
AC  
実行時間 285 ms / 1,000 ms
コード長 546 bytes
コンパイル時間 11,862 ms
コンパイル使用メモリ 413,608 KB
実行使用メモリ 53,756 KB
最終ジャッジ日時 2023-08-13 02:38:43
合計ジャッジ時間 21,493 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 275 ms
53,604 KB
testcase_01 AC 276 ms
53,592 KB
testcase_02 AC 275 ms
53,656 KB
testcase_03 AC 276 ms
53,596 KB
testcase_04 AC 279 ms
53,588 KB
testcase_05 AC 276 ms
53,668 KB
testcase_06 AC 275 ms
53,580 KB
testcase_07 AC 277 ms
53,728 KB
testcase_08 AC 275 ms
53,636 KB
testcase_09 AC 274 ms
53,464 KB
testcase_10 AC 276 ms
53,504 KB
testcase_11 AC 281 ms
53,576 KB
testcase_12 AC 284 ms
53,576 KB
testcase_13 AC 277 ms
53,568 KB
testcase_14 AC 278 ms
53,660 KB
testcase_15 AC 285 ms
53,608 KB
testcase_16 AC 284 ms
53,516 KB
testcase_17 AC 282 ms
53,664 KB
testcase_18 AC 277 ms
53,600 KB
testcase_19 AC 278 ms
53,592 KB
testcase_20 AC 281 ms
53,592 KB
testcase_21 AC 284 ms
53,668 KB
testcase_22 AC 282 ms
53,604 KB
testcase_23 AC 275 ms
53,508 KB
testcase_24 AC 277 ms
53,644 KB
testcase_25 AC 281 ms
53,604 KB
testcase_26 AC 275 ms
53,588 KB
testcase_27 AC 281 ms
53,756 KB
testcase_28 AC 280 ms
53,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder

fun main() {
    val C1: String = readLine()!!
    val C2: String = readLine()!!

    var C = mutableListOf<Char>()
    C.addAll(C1.toCharArray().toList())
    C.addAll(C2.toCharArray().toList())
    C.add('x')

    var count = 0
    var maxCount = 0
    for (i in 0 until C.size) {
        when (C[i]) {
            'o' -> count++
            'x' -> {
                if (maxCount < count) {
                    maxCount = count
                }
                count = 0
            }
        }
    }
    println(maxCount)
}
0