結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー jimanojimano
提出日時 2018-01-13 18:06:54
言語 Java19
(openjdk 21)
結果
AC  
実行時間 125 ms / 1,000 ms
コード長 490 bytes
コンパイル時間 3,845 ms
コンパイル使用メモリ 73,604 KB
実行使用メモリ 56,104 KB
最終ジャッジ日時 2023-08-11 16:39:35
合計ジャッジ時間 8,024 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,912 KB
testcase_01 AC 121 ms
55,928 KB
testcase_02 AC 125 ms
55,764 KB
testcase_03 AC 120 ms
55,708 KB
testcase_04 AC 121 ms
55,656 KB
testcase_05 AC 119 ms
55,800 KB
testcase_06 AC 118 ms
53,460 KB
testcase_07 AC 120 ms
55,724 KB
testcase_08 AC 122 ms
55,996 KB
testcase_09 AC 122 ms
56,024 KB
testcase_10 AC 123 ms
55,860 KB
testcase_11 AC 121 ms
55,952 KB
testcase_12 AC 119 ms
56,052 KB
testcase_13 AC 121 ms
55,640 KB
testcase_14 AC 121 ms
55,740 KB
testcase_15 AC 121 ms
55,732 KB
testcase_16 AC 121 ms
55,932 KB
testcase_17 AC 121 ms
55,928 KB
testcase_18 AC 119 ms
55,876 KB
testcase_19 AC 122 ms
56,072 KB
testcase_20 AC 120 ms
55,580 KB
testcase_21 AC 123 ms
55,848 KB
testcase_22 AC 124 ms
56,052 KB
testcase_23 AC 123 ms
55,932 KB
testcase_24 AC 125 ms
55,872 KB
testcase_25 AC 122 ms
54,288 KB
testcase_26 AC 121 ms
56,104 KB
testcase_27 AC 120 ms
55,888 KB
testcase_28 AC 122 ms
55,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;

import java.util.Scanner;

public class No0203 {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int cntHolidays = 0;
			int tmp = 0;
			String s = sc.nextLine() + sc.nextLine();

			for (int i = 0; i < 14; i++) {
				if (s.charAt(i) == 'o') {
					tmp++;
				}
				if (cntHolidays < tmp) {
					cntHolidays = tmp;
				}
				if (s.charAt(i) == 'x') {
					tmp = 0;
				}
			}
			System.out.println(cntHolidays);
		}
	}
}
0