結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-09 18:04:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 1,000 ms
コード長 407 bytes
コンパイル時間 2,247 ms
コンパイル使用メモリ 76,448 KB
実行使用メモリ 41,680 KB
最終ジャッジ日時 2024-04-29 08:30:00
合計ジャッジ時間 7,006 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
41,168 KB
testcase_01 AC 130 ms
41,056 KB
testcase_02 AC 131 ms
40,824 KB
testcase_03 AC 130 ms
41,196 KB
testcase_04 AC 130 ms
41,284 KB
testcase_05 AC 130 ms
41,440 KB
testcase_06 AC 130 ms
41,680 KB
testcase_07 AC 129 ms
41,312 KB
testcase_08 AC 130 ms
41,112 KB
testcase_09 AC 129 ms
41,064 KB
testcase_10 AC 132 ms
41,052 KB
testcase_11 AC 131 ms
41,340 KB
testcase_12 AC 130 ms
41,328 KB
testcase_13 AC 117 ms
39,980 KB
testcase_14 AC 130 ms
40,892 KB
testcase_15 AC 116 ms
40,016 KB
testcase_16 AC 131 ms
41,444 KB
testcase_17 AC 130 ms
41,236 KB
testcase_18 AC 118 ms
40,176 KB
testcase_19 AC 130 ms
41,464 KB
testcase_20 AC 119 ms
40,208 KB
testcase_21 AC 129 ms
41,312 KB
testcase_22 AC 130 ms
40,972 KB
testcase_23 AC 133 ms
41,108 KB
testcase_24 AC 134 ms
41,044 KB
testcase_25 AC 132 ms
41,216 KB
testcase_26 AC 130 ms
41,268 KB
testcase_27 AC 131 ms
40,916 KB
testcase_28 AC 116 ms
40,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		String s = "";
		for (int i=0; i<2; i++) {
			s += sc.nextLine();
		}
		
		int count = 0;
		int max = 0;
		for (int i=0; i<s.length(); i++) {
			if (s.charAt(i)=='o') {
				count++;
				max = Math.max(max,count);
			}
			else {count = 0;}
		}
		
		System.out.println(max);
	}
}
0