結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
31,060 KB
testcase_01 WA -
testcase_02 AC 38 ms
30,956 KB
testcase_03 AC 38 ms
30,920 KB
testcase_04 AC 38 ms
31,172 KB
testcase_05 AC 39 ms
31,032 KB
testcase_06 AC 40 ms
30,880 KB
testcase_07 AC 38 ms
31,048 KB
testcase_08 AC 39 ms
30,788 KB
testcase_09 AC 39 ms
31,176 KB
testcase_10 AC 38 ms
31,136 KB
testcase_11 AC 39 ms
31,080 KB
testcase_12 AC 37 ms
31,052 KB
testcase_13 AC 38 ms
31,264 KB
testcase_14 AC 36 ms
31,332 KB
testcase_15 AC 37 ms
31,156 KB
testcase_16 AC 38 ms
31,068 KB
testcase_17 AC 38 ms
31,072 KB
testcase_18 AC 37 ms
31,092 KB
testcase_19 AC 38 ms
30,760 KB
testcase_20 AC 37 ms
31,144 KB
testcase_21 AC 38 ms
31,064 KB
testcase_22 AC 38 ms
31,248 KB
testcase_23 AC 38 ms
30,816 KB
testcase_24 AC 38 ms
31,108 KB
testcase_25 AC 38 ms
30,880 KB
testcase_26 AC 38 ms
31,060 KB
testcase_27 AC 38 ms
30,992 KB
testcase_28 AC 39 ms
31,208 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