結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-14 17:52:39
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 528 bytes
コンパイル時間 1,864 ms
コンパイル使用メモリ 73,996 KB
実行使用メモリ 56,540 KB
最終ジャッジ日時 2023-08-11 02:29:18
合計ジャッジ時間 7,543 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
55,964 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 106 ms
56,048 KB
testcase_08 AC 107 ms
55,932 KB
testcase_09 AC 104 ms
55,420 KB
testcase_10 AC 107 ms
55,756 KB
testcase_11 AC 107 ms
55,596 KB
testcase_12 AC 104 ms
55,892 KB
testcase_13 AC 103 ms
55,856 KB
testcase_14 AC 100 ms
55,404 KB
testcase_15 AC 104 ms
55,940 KB
testcase_16 AC 111 ms
56,012 KB
testcase_17 AC 106 ms
56,116 KB
testcase_18 AC 102 ms
55,788 KB
testcase_19 AC 107 ms
55,432 KB
testcase_20 AC 102 ms
56,048 KB
testcase_21 AC 107 ms
55,976 KB
testcase_22 AC 102 ms
55,588 KB
testcase_23 AC 108 ms
56,220 KB
testcase_24 AC 107 ms
56,112 KB
testcase_25 AC 108 ms
55,952 KB
testcase_26 AC 114 ms
56,044 KB
testcase_27 AC 103 ms
55,636 KB
testcase_28 AC 105 ms
53,696 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