結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー |
![]() |
提出日時 | 2017-09-11 21:35:16 |
言語 | PHP (843.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 504 bytes |
コンパイル時間 | 1,147 ms |
コンパイル使用メモリ | 30,776 KB |
実行使用メモリ | 31,332 KB |
最終ジャッジ日時 | 2024-11-07 17:06:23 |
合計ジャッジ時間 | 3,248 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 WA * 1 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?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; ?>