結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー shinwisteriashinwisteria
提出日時 2018-02-21 22:36:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 1,000 ms
コード長 445 bytes
コンパイル時間 3,228 ms
コンパイル使用メモリ 78,524 KB
実行使用メモリ 41,268 KB
最終ジャッジ日時 2024-04-29 08:30:45
合計ジャッジ時間 7,593 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
39,960 KB
testcase_01 AC 109 ms
40,072 KB
testcase_02 AC 122 ms
41,136 KB
testcase_03 AC 112 ms
40,512 KB
testcase_04 AC 120 ms
40,872 KB
testcase_05 AC 122 ms
41,076 KB
testcase_06 AC 123 ms
40,916 KB
testcase_07 AC 108 ms
40,036 KB
testcase_08 AC 123 ms
41,056 KB
testcase_09 AC 121 ms
41,220 KB
testcase_10 AC 118 ms
40,968 KB
testcase_11 AC 124 ms
40,656 KB
testcase_12 AC 113 ms
40,456 KB
testcase_13 AC 126 ms
41,128 KB
testcase_14 AC 123 ms
41,024 KB
testcase_15 AC 120 ms
41,268 KB
testcase_16 AC 112 ms
40,456 KB
testcase_17 AC 121 ms
41,116 KB
testcase_18 AC 108 ms
40,100 KB
testcase_19 AC 110 ms
39,760 KB
testcase_20 AC 121 ms
40,856 KB
testcase_21 AC 109 ms
40,104 KB
testcase_22 AC 109 ms
39,960 KB
testcase_23 AC 105 ms
40,072 KB
testcase_24 AC 125 ms
40,788 KB
testcase_25 AC 123 ms
41,076 KB
testcase_26 AC 122 ms
40,920 KB
testcase_27 AC 121 ms
41,088 KB
testcase_28 AC 120 ms
41,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con203 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		String[] w = {s.next() , s.next()};
		s.close();

		int max = 0 , k = 0;
		for(int i = 0;i < 2;i++){
			for(int j = 0;j < 7;j++){
				if(w[i].charAt(j) == 'o'){
					k++;
				}else{
					max = Math.max(max, k);
					k = 0;
				}
			}
		}
		max = Math.max(max, k);
		System.out.println(max);

	}

}
0