結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー komkomhkomkomh
提出日時 2019-06-20 10:18:44
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 274 ms / 1,000 ms
コード長 546 bytes
コンパイル時間 13,405 ms
コンパイル使用メモリ 430,000 KB
実行使用メモリ 57,936 KB
最終ジャッジ日時 2024-04-30 21:06:32
合計ジャッジ時間 18,020 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 261 ms
57,852 KB
testcase_01 AC 272 ms
57,824 KB
testcase_02 AC 263 ms
57,876 KB
testcase_03 AC 262 ms
57,736 KB
testcase_04 AC 262 ms
57,684 KB
testcase_05 AC 260 ms
57,848 KB
testcase_06 AC 262 ms
57,776 KB
testcase_07 AC 259 ms
57,788 KB
testcase_08 AC 263 ms
57,852 KB
testcase_09 AC 259 ms
57,776 KB
testcase_10 AC 262 ms
57,880 KB
testcase_11 AC 260 ms
57,856 KB
testcase_12 AC 263 ms
57,572 KB
testcase_13 AC 265 ms
57,936 KB
testcase_14 AC 262 ms
57,852 KB
testcase_15 AC 257 ms
57,652 KB
testcase_16 AC 259 ms
57,760 KB
testcase_17 AC 255 ms
57,724 KB
testcase_18 AC 260 ms
57,640 KB
testcase_19 AC 256 ms
57,768 KB
testcase_20 AC 274 ms
57,844 KB
testcase_21 AC 264 ms
57,776 KB
testcase_22 AC 262 ms
57,816 KB
testcase_23 AC 263 ms
57,828 KB
testcase_24 AC 265 ms
57,728 KB
testcase_25 AC 263 ms
57,860 KB
testcase_26 AC 259 ms
57,704 KB
testcase_27 AC 263 ms
57,748 KB
testcase_28 AC 263 ms
57,840 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