結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー uafr_csuafr_cs
提出日時 2015-05-16 02:05:33
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 1,000 ms
コード長 463 bytes
コンパイル時間 2,411 ms
コンパイル使用メモリ 82,588 KB
実行使用メモリ 41,400 KB
最終ジャッジ日時 2024-04-29 07:45:41
合計ジャッジ時間 7,010 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
41,220 KB
testcase_01 AC 126 ms
40,936 KB
testcase_02 AC 114 ms
40,280 KB
testcase_03 AC 125 ms
41,160 KB
testcase_04 AC 126 ms
41,024 KB
testcase_05 AC 125 ms
41,040 KB
testcase_06 AC 127 ms
41,352 KB
testcase_07 AC 129 ms
41,400 KB
testcase_08 AC 125 ms
41,012 KB
testcase_09 AC 115 ms
40,060 KB
testcase_10 AC 126 ms
41,200 KB
testcase_11 AC 127 ms
41,056 KB
testcase_12 AC 126 ms
41,212 KB
testcase_13 AC 128 ms
40,780 KB
testcase_14 AC 127 ms
40,960 KB
testcase_15 AC 127 ms
41,168 KB
testcase_16 AC 129 ms
40,852 KB
testcase_17 AC 123 ms
41,172 KB
testcase_18 AC 128 ms
40,952 KB
testcase_19 AC 128 ms
40,928 KB
testcase_20 AC 128 ms
41,056 KB
testcase_21 AC 125 ms
41,028 KB
testcase_22 AC 126 ms
41,204 KB
testcase_23 AC 131 ms
41,168 KB
testcase_24 AC 126 ms
40,852 KB
testcase_25 AC 127 ms
40,944 KB
testcase_26 AC 110 ms
39,788 KB
testcase_27 AC 124 ms
41,012 KB
testcase_28 AC 128 ms
41,044 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