結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー spaciaspacia
提出日時 2015-12-16 17:04:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 59 ms / 1,000 ms
コード長 560 bytes
コンパイル時間 2,311 ms
コンパイル使用メモリ 75,344 KB
実行使用メモリ 37,404 KB
最終ジャッジ日時 2024-04-29 08:00:06
合計ジャッジ時間 5,086 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
36,812 KB
testcase_01 AC 59 ms
37,164 KB
testcase_02 AC 58 ms
37,040 KB
testcase_03 AC 57 ms
36,976 KB
testcase_04 AC 55 ms
36,980 KB
testcase_05 AC 56 ms
37,124 KB
testcase_06 AC 57 ms
37,116 KB
testcase_07 AC 58 ms
36,928 KB
testcase_08 AC 57 ms
37,260 KB
testcase_09 AC 57 ms
37,288 KB
testcase_10 AC 54 ms
37,296 KB
testcase_11 AC 56 ms
37,156 KB
testcase_12 AC 56 ms
37,096 KB
testcase_13 AC 56 ms
36,952 KB
testcase_14 AC 55 ms
36,700 KB
testcase_15 AC 55 ms
36,692 KB
testcase_16 AC 56 ms
37,252 KB
testcase_17 AC 57 ms
37,256 KB
testcase_18 AC 56 ms
36,600 KB
testcase_19 AC 58 ms
36,728 KB
testcase_20 AC 57 ms
36,908 KB
testcase_21 AC 56 ms
37,224 KB
testcase_22 AC 55 ms
37,160 KB
testcase_23 AC 56 ms
37,404 KB
testcase_24 AC 56 ms
37,256 KB
testcase_25 AC 55 ms
37,124 KB
testcase_26 AC 56 ms
36,836 KB
testcase_27 AC 55 ms
37,216 KB
testcase_28 AC 56 ms
36,836 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