結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー discoNekodiscoNeko
提出日時 2016-04-28 23:31:42
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 625 bytes
コンパイル時間 2,425 ms
コンパイル使用メモリ 75,200 KB
実行使用メモリ 50,632 KB
最終ジャッジ日時 2024-04-15 05:14:36
合計ジャッジ時間 4,864 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
50,564 KB
testcase_01 AC 55 ms
50,156 KB
testcase_02 AC 54 ms
50,384 KB
testcase_03 AC 54 ms
50,124 KB
testcase_04 AC 55 ms
50,244 KB
testcase_05 AC 55 ms
50,296 KB
testcase_06 AC 56 ms
50,176 KB
testcase_07 AC 55 ms
50,544 KB
testcase_08 AC 55 ms
50,332 KB
testcase_09 AC 56 ms
50,512 KB
testcase_10 WA -
testcase_11 AC 54 ms
50,484 KB
testcase_12 AC 56 ms
50,212 KB
testcase_13 AC 54 ms
50,096 KB
testcase_14 AC 54 ms
50,496 KB
testcase_15 AC 54 ms
50,484 KB
testcase_16 WA -
testcase_17 AC 54 ms
50,104 KB
testcase_18 AC 54 ms
50,212 KB
testcase_19 AC 54 ms
50,456 KB
testcase_20 AC 54 ms
50,472 KB
testcase_21 AC 56 ms
50,516 KB
testcase_22 AC 56 ms
50,512 KB
testcase_23 AC 55 ms
50,536 KB
testcase_24 AC 56 ms
50,532 KB
testcase_25 AC 54 ms
50,160 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

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;
			}
		}
		sb.append(max);
		System.out.println(sb);
	}
}
0