結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-14 17:52:39
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 528 bytes
コンパイル時間 2,263 ms
コンパイル使用メモリ 77,096 KB
実行使用メモリ 41,472 KB
最終ジャッジ日時 2024-04-28 19:37:26
合計ジャッジ時間 7,332 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
41,272 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 128 ms
41,020 KB
testcase_08 AC 135 ms
41,308 KB
testcase_09 AC 127 ms
41,052 KB
testcase_10 AC 130 ms
41,292 KB
testcase_11 AC 115 ms
39,668 KB
testcase_12 AC 127 ms
41,284 KB
testcase_13 AC 114 ms
40,236 KB
testcase_14 AC 131 ms
41,284 KB
testcase_15 AC 132 ms
41,472 KB
testcase_16 AC 129 ms
40,932 KB
testcase_17 AC 129 ms
41,188 KB
testcase_18 AC 128 ms
41,164 KB
testcase_19 AC 130 ms
41,264 KB
testcase_20 AC 113 ms
40,004 KB
testcase_21 AC 130 ms
41,008 KB
testcase_22 AC 130 ms
40,916 KB
testcase_23 AC 129 ms
41,084 KB
testcase_24 AC 128 ms
41,400 KB
testcase_25 AC 130 ms
41,408 KB
testcase_26 AC 128 ms
41,292 KB
testcase_27 AC 128 ms
41,388 KB
testcase_28 AC 115 ms
40,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] s = new String[14];
		String s1 = sc.next() + sc.next();
		for(int i = 0 ; i < 14 ; i++) s[i] = "" + s1.charAt(i);
		int ans = -1001001001;
		for(int i = 0 ; i < 14 ; i++) {
			if(s[i].equals("o")) {
				for(int j = i + 1 ; j < 14 ; j++) {
					if(s[j].equals("o")) {
						ans = Math.max(ans, j - i + 1);
					} else {
						break;
					}
				}
			}
		}
		System.out.println(ans);
 	}
}
0