結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-09 18:03:23
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 423 bytes
コンパイル時間 2,208 ms
コンパイル使用メモリ 76,024 KB
実行使用メモリ 41,668 KB
最終ジャッジ日時 2024-04-16 18:56:10
合計ジャッジ時間 6,975 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
41,248 KB
testcase_01 WA -
testcase_02 AC 127 ms
41,292 KB
testcase_03 AC 127 ms
41,264 KB
testcase_04 AC 126 ms
41,168 KB
testcase_05 AC 127 ms
41,384 KB
testcase_06 AC 129 ms
41,668 KB
testcase_07 AC 129 ms
41,296 KB
testcase_08 AC 128 ms
41,132 KB
testcase_09 AC 112 ms
40,200 KB
testcase_10 AC 125 ms
41,244 KB
testcase_11 AC 126 ms
41,428 KB
testcase_12 AC 111 ms
40,292 KB
testcase_13 AC 127 ms
40,988 KB
testcase_14 AC 126 ms
41,180 KB
testcase_15 AC 118 ms
40,748 KB
testcase_16 AC 114 ms
39,984 KB
testcase_17 AC 126 ms
41,124 KB
testcase_18 AC 128 ms
41,224 KB
testcase_19 AC 126 ms
41,392 KB
testcase_20 AC 115 ms
40,280 KB
testcase_21 AC 128 ms
41,216 KB
testcase_22 AC 126 ms
41,116 KB
testcase_23 AC 125 ms
41,304 KB
testcase_24 AC 125 ms
41,344 KB
testcase_25 AC 127 ms
41,164 KB
testcase_26 AC 118 ms
40,620 KB
testcase_27 AC 126 ms
41,292 KB
testcase_28 AC 124 ms
40,984 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 = Integer.MIN_VALUE;
		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