結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー tazakkytazakky
提出日時 2017-09-11 21:35:16
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 504 bytes
コンパイル時間 2,922 ms
コンパイル使用メモリ 30,984 KB
実行使用メモリ 31,336 KB
最終ジャッジ日時 2024-04-25 06:53:35
合計ジャッジ時間 4,635 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
30,948 KB
testcase_01 WA -
testcase_02 AC 40 ms
30,852 KB
testcase_03 AC 38 ms
31,196 KB
testcase_04 AC 40 ms
31,048 KB
testcase_05 AC 39 ms
30,912 KB
testcase_06 AC 39 ms
31,144 KB
testcase_07 AC 39 ms
31,068 KB
testcase_08 AC 39 ms
31,128 KB
testcase_09 AC 40 ms
31,072 KB
testcase_10 AC 39 ms
30,888 KB
testcase_11 AC 41 ms
31,128 KB
testcase_12 AC 38 ms
31,144 KB
testcase_13 AC 39 ms
31,280 KB
testcase_14 AC 40 ms
31,084 KB
testcase_15 AC 40 ms
31,120 KB
testcase_16 AC 39 ms
31,052 KB
testcase_17 AC 39 ms
31,036 KB
testcase_18 AC 40 ms
30,888 KB
testcase_19 AC 39 ms
31,100 KB
testcase_20 AC 40 ms
30,928 KB
testcase_21 AC 39 ms
30,892 KB
testcase_22 AC 38 ms
31,192 KB
testcase_23 AC 38 ms
31,136 KB
testcase_24 AC 41 ms
31,152 KB
testcase_25 AC 38 ms
31,148 KB
testcase_26 AC 40 ms
31,156 KB
testcase_27 AC 41 ms
31,160 KB
testcase_28 AC 38 ms
31,188 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
    // 2 週間分の平日(xx)と休日(oo)が分かるカレンダーが与えられま
    $input = trim(fgets(STDIN));
    $input .= trim(fgets(STDIN))."x";
    
    //echo $input;
    $ren = 1;
    $max = 0;
    for($i = 0; $i < strlen($input); $i++){
        if($input[$i] == "o" && $input[$i + 1] == "o"){
            $ren ++;
        }elseif($input[$i] == "x"){
            if($max < $ren){
                $max = $ren;
            }
            $ren = 1;
        }
    }
    echo $max;
?>
0