結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー |
![]() |
提出日時 | 2017-09-11 21:39:55 |
言語 | PHP (843.2) |
結果 |
AC
|
実行時間 | 43 ms / 1,000 ms |
コード長 | 579 bytes |
コンパイル時間 | 2,739 ms |
コンパイル使用メモリ | 31,764 KB |
実行使用メモリ | 32,528 KB |
最終ジャッジ日時 | 2024-11-18 10:16:03 |
合計ジャッジ時間 | 4,648 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php // 2 週間分の平日(xx)と休日(oo)が分かるカレンダーが与えられま $input = trim(fgets(STDIN)); $input .= trim(fgets(STDIN))."x"; if(strpos($input, "o") === FALSE){ echo 0; exit; } //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; ?>