結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー spacia
提出日時 2015-12-16 17:04:13
言語 Java
(openjdk 23)
結果
AC  
実行時間 66 ms / 1,000 ms
コード長 560 bytes
コンパイル時間 2,284 ms
コンパイル使用メモリ 75,276 KB
実行使用メモリ 50,656 KB
最終ジャッジ日時 2024-11-18 09:37:06
合計ジャッジ時間 5,082 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

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