結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー discoNekodiscoNeko
提出日時 2016-04-28 23:33:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 57 ms / 1,000 ms
コード長 654 bytes
コンパイル時間 2,287 ms
コンパイル使用メモリ 75,584 KB
実行使用メモリ 37,432 KB
最終ジャッジ日時 2024-04-29 08:04:41
合計ジャッジ時間 4,906 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
36,996 KB
testcase_01 AC 55 ms
37,220 KB
testcase_02 AC 57 ms
37,276 KB
testcase_03 AC 55 ms
37,256 KB
testcase_04 AC 54 ms
37,284 KB
testcase_05 AC 56 ms
37,288 KB
testcase_06 AC 54 ms
37,236 KB
testcase_07 AC 56 ms
36,780 KB
testcase_08 AC 57 ms
37,252 KB
testcase_09 AC 56 ms
37,228 KB
testcase_10 AC 54 ms
37,220 KB
testcase_11 AC 56 ms
36,904 KB
testcase_12 AC 55 ms
37,176 KB
testcase_13 AC 56 ms
37,432 KB
testcase_14 AC 56 ms
37,232 KB
testcase_15 AC 56 ms
37,248 KB
testcase_16 AC 55 ms
36,800 KB
testcase_17 AC 55 ms
37,116 KB
testcase_18 AC 56 ms
37,176 KB
testcase_19 AC 56 ms
36,916 KB
testcase_20 AC 55 ms
36,796 KB
testcase_21 AC 55 ms
37,320 KB
testcase_22 AC 55 ms
36,912 KB
testcase_23 AC 55 ms
36,896 KB
testcase_24 AC 54 ms
36,812 KB
testcase_25 AC 55 ms
37,064 KB
testcase_26 AC 55 ms
37,240 KB
testcase_27 AC 54 ms
37,136 KB
testcase_28 AC 54 ms
37,300 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.math.*;
 
public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		String a = br.readLine()+ br.readLine();
		int l = a.length();
		int chain = 0;
		int max = 0;
		for(int i = 0; i < l; i++){
			char c = a.charAt(i);
			if(c=='o'){
				chain++;
			}else{
				max = Math.max(max,chain);
				chain = 0;
			}
		}
		max = Math.max(max,chain);
		sb.append(max);
		System.out.println(sb);
	}
}
0