結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー jimanojimano
提出日時 2018-01-13 18:06:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 117 ms / 1,000 ms
コード長 490 bytes
コンパイル時間 3,615 ms
コンパイル使用メモリ 77,076 KB
実行使用メモリ 41,624 KB
最終ジャッジ日時 2024-04-29 08:28:19
合計ジャッジ時間 7,127 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
41,140 KB
testcase_01 AC 107 ms
41,072 KB
testcase_02 AC 106 ms
41,140 KB
testcase_03 AC 107 ms
41,500 KB
testcase_04 AC 106 ms
40,244 KB
testcase_05 AC 112 ms
41,228 KB
testcase_06 AC 111 ms
41,480 KB
testcase_07 AC 111 ms
41,456 KB
testcase_08 AC 102 ms
41,476 KB
testcase_09 AC 114 ms
40,992 KB
testcase_10 AC 110 ms
41,068 KB
testcase_11 AC 108 ms
41,048 KB
testcase_12 AC 110 ms
41,096 KB
testcase_13 AC 112 ms
41,216 KB
testcase_14 AC 102 ms
41,300 KB
testcase_15 AC 106 ms
41,136 KB
testcase_16 AC 112 ms
39,972 KB
testcase_17 AC 100 ms
41,288 KB
testcase_18 AC 106 ms
39,876 KB
testcase_19 AC 102 ms
41,272 KB
testcase_20 AC 106 ms
41,076 KB
testcase_21 AC 108 ms
41,192 KB
testcase_22 AC 113 ms
41,388 KB
testcase_23 AC 111 ms
40,960 KB
testcase_24 AC 108 ms
41,624 KB
testcase_25 AC 117 ms
41,012 KB
testcase_26 AC 114 ms
40,932 KB
testcase_27 AC 114 ms
41,320 KB
testcase_28 AC 106 ms
41,088 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