結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー FVRChanFVRChan
提出日時 2017-10-02 21:21:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 1,000 ms
コード長 419 bytes
コンパイル時間 2,377 ms
コンパイル使用メモリ 76,744 KB
実行使用メモリ 41,464 KB
最終ジャッジ日時 2024-04-29 08:26:21
合計ジャッジ時間 6,656 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
41,212 KB
testcase_01 AC 114 ms
39,712 KB
testcase_02 AC 126 ms
41,152 KB
testcase_03 AC 118 ms
40,472 KB
testcase_04 AC 114 ms
39,896 KB
testcase_05 AC 128 ms
41,136 KB
testcase_06 AC 115 ms
40,168 KB
testcase_07 AC 125 ms
41,148 KB
testcase_08 AC 112 ms
40,012 KB
testcase_09 AC 127 ms
41,464 KB
testcase_10 AC 130 ms
41,328 KB
testcase_11 AC 126 ms
41,060 KB
testcase_12 AC 128 ms
41,020 KB
testcase_13 AC 125 ms
41,048 KB
testcase_14 AC 125 ms
40,904 KB
testcase_15 AC 127 ms
40,848 KB
testcase_16 AC 127 ms
41,028 KB
testcase_17 AC 112 ms
40,084 KB
testcase_18 AC 113 ms
40,012 KB
testcase_19 AC 116 ms
39,884 KB
testcase_20 AC 130 ms
41,164 KB
testcase_21 AC 117 ms
40,792 KB
testcase_22 AC 119 ms
40,232 KB
testcase_23 AC 112 ms
39,964 KB
testcase_24 AC 113 ms
39,804 KB
testcase_25 AC 125 ms
41,000 KB
testcase_26 AC 117 ms
39,980 KB
testcase_27 AC 126 ms
40,912 KB
testcase_28 AC 129 ms
41,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main{
	private static Scanner sc=new Scanner(System.in);
	public static void main(String args[])throws Exception{
		char are[]=(sc.nextLine()+sc.nextLine()).toCharArray();
		int max=0,counter=0;
		for(char element:are){
			if(element == 'o'){
				counter++;
			}else{
				max=Math.max(max,counter);
				counter=0;
			}
		}max=Math.max(max,counter);
		System.out.println(max);
	}
}
0