結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー ねずねず
提出日時 2018-01-29 11:02:15
言語 PHP
(8.3.4)
結果
AC  
実行時間 42 ms / 1,000 ms
コード長 222 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 31,172 KB
実行使用メモリ 31,284 KB
最終ジャッジ日時 2024-04-29 08:29:36
合計ジャッジ時間 2,172 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
30,720 KB
testcase_01 AC 42 ms
30,844 KB
testcase_02 AC 41 ms
30,944 KB
testcase_03 AC 41 ms
30,860 KB
testcase_04 AC 39 ms
31,004 KB
testcase_05 AC 40 ms
31,220 KB
testcase_06 AC 40 ms
31,108 KB
testcase_07 AC 41 ms
30,912 KB
testcase_08 AC 40 ms
30,928 KB
testcase_09 AC 40 ms
30,908 KB
testcase_10 AC 39 ms
30,548 KB
testcase_11 AC 41 ms
30,992 KB
testcase_12 AC 40 ms
31,008 KB
testcase_13 AC 40 ms
30,828 KB
testcase_14 AC 40 ms
30,952 KB
testcase_15 AC 40 ms
30,944 KB
testcase_16 AC 40 ms
30,928 KB
testcase_17 AC 39 ms
30,832 KB
testcase_18 AC 39 ms
31,012 KB
testcase_19 AC 41 ms
30,892 KB
testcase_20 AC 41 ms
31,284 KB
testcase_21 AC 42 ms
31,176 KB
testcase_22 AC 40 ms
30,936 KB
testcase_23 AC 40 ms
30,900 KB
testcase_24 AC 40 ms
31,044 KB
testcase_25 AC 39 ms
30,828 KB
testcase_26 AC 41 ms
30,776 KB
testcase_27 AC 41 ms
30,872 KB
testcase_28 AC 40 ms
31,052 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$c  = trim(fgets(STDIN));
$c .= trim(fgets(STDIN));
$cnt = $ans = 0;
for ($i = 0; $i < strlen($c); $i++) {
	if ($c[$i] == 'o') {
		$cnt++;
	} else {
		$ans = max($ans, $cnt);
		$cnt = 0;
	}
}
echo max($ans, $cnt);
?>
0