結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー spaciaspacia
提出日時 2015-12-16 17:04:13
言語 Java19
(openjdk 21)
結果
AC  
実行時間 51 ms / 1,000 ms
コード長 560 bytes
コンパイル時間 2,347 ms
コンパイル使用メモリ 72,352 KB
実行使用メモリ 49,896 KB
最終ジャッジ日時 2023-08-11 16:02:49
合計ジャッジ時間 5,072 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
49,688 KB
testcase_01 AC 50 ms
47,860 KB
testcase_02 AC 50 ms
49,892 KB
testcase_03 AC 49 ms
49,528 KB
testcase_04 AC 50 ms
47,476 KB
testcase_05 AC 49 ms
49,316 KB
testcase_06 AC 49 ms
49,388 KB
testcase_07 AC 49 ms
49,640 KB
testcase_08 AC 50 ms
49,656 KB
testcase_09 AC 49 ms
49,524 KB
testcase_10 AC 49 ms
49,312 KB
testcase_11 AC 49 ms
49,440 KB
testcase_12 AC 48 ms
49,516 KB
testcase_13 AC 50 ms
49,880 KB
testcase_14 AC 50 ms
49,324 KB
testcase_15 AC 50 ms
49,884 KB
testcase_16 AC 49 ms
49,520 KB
testcase_17 AC 50 ms
49,520 KB
testcase_18 AC 49 ms
49,560 KB
testcase_19 AC 49 ms
49,620 KB
testcase_20 AC 49 ms
49,444 KB
testcase_21 AC 49 ms
49,432 KB
testcase_22 AC 49 ms
49,444 KB
testcase_23 AC 50 ms
49,428 KB
testcase_24 AC 49 ms
49,896 KB
testcase_25 AC 50 ms
49,500 KB
testcase_26 AC 51 ms
49,684 KB
testcase_27 AC 50 ms
49,524 KB
testcase_28 AC 49 ms
49,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;
import java.math.*;

class Main203 {
	
	public static void main (String[] args) throws IOException {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		String line1 = br.readLine();
		String line2 = br.readLine();
		String line3 = line1 + line2;
		
		int ans = 0, cnt = 0;
		for (int i = 0; i < line3.length(); i++) {
			char c = line3.charAt(i);
			if (c == 'o') {
				cnt++;
			} else {
				ans = Math.max(ans, cnt);
				cnt = 0;
			}
		}
		System.out.println(Math.max(ans , cnt));
	}
}
0