結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー uafr_csuafr_cs
提出日時 2015-05-16 02:05:33
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 1,000 ms
コード長 463 bytes
コンパイル時間 5,142 ms
コンパイル使用メモリ 75,788 KB
実行使用メモリ 56,316 KB
最終ジャッジ日時 2023-08-11 15:44:01
合計ジャッジ時間 10,015 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,096 KB
testcase_01 AC 119 ms
55,368 KB
testcase_02 AC 118 ms
55,356 KB
testcase_03 AC 119 ms
55,380 KB
testcase_04 AC 122 ms
55,384 KB
testcase_05 AC 120 ms
55,388 KB
testcase_06 AC 121 ms
55,396 KB
testcase_07 AC 123 ms
55,356 KB
testcase_08 AC 123 ms
55,492 KB
testcase_09 AC 120 ms
55,460 KB
testcase_10 AC 124 ms
55,308 KB
testcase_11 AC 119 ms
55,304 KB
testcase_12 AC 120 ms
55,476 KB
testcase_13 AC 119 ms
55,492 KB
testcase_14 AC 122 ms
55,456 KB
testcase_15 AC 123 ms
55,388 KB
testcase_16 AC 120 ms
55,388 KB
testcase_17 AC 120 ms
55,388 KB
testcase_18 AC 123 ms
55,192 KB
testcase_19 AC 120 ms
55,756 KB
testcase_20 AC 121 ms
55,468 KB
testcase_21 AC 121 ms
55,376 KB
testcase_22 AC 122 ms
56,316 KB
testcase_23 AC 119 ms
55,452 KB
testcase_24 AC 118 ms
55,180 KB
testcase_25 AC 116 ms
55,248 KB
testcase_26 AC 118 ms
55,508 KB
testcase_27 AC 121 ms
55,268 KB
testcase_28 AC 120 ms
55,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		final char[] days = (sc.next() + sc.next()).toCharArray();
		
		int count = 0, max = 0;
		for(char c : days){
			if(c == 'o'){
				count++;
			}else{
				max = Math.max(max, count);
				count = 0;
			}
		}
		max = Math.max(max, count);
		
		System.out.println(max);
		
	}
	
}
0