結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー k_kadorak_kadora
提出日時 2015-06-16 21:08:07
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 706 bytes
コンパイル時間 4,272 ms
コンパイル使用メモリ 76,640 KB
実行使用メモリ 41,668 KB
最終ジャッジ日時 2024-04-21 14:36:17
合計ジャッジ時間 12,648 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 148 ms
41,012 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 143 ms
41,512 KB
testcase_05 AC 146 ms
41,556 KB
testcase_06 AC 144 ms
41,540 KB
testcase_07 AC 143 ms
41,200 KB
testcase_08 AC 142 ms
41,100 KB
testcase_09 AC 143 ms
41,036 KB
testcase_10 AC 147 ms
41,304 KB
testcase_11 WA -
testcase_12 AC 148 ms
41,196 KB
testcase_13 AC 144 ms
41,160 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 145 ms
41,216 KB
testcase_17 AC 145 ms
41,360 KB
testcase_18 AC 146 ms
41,364 KB
testcase_19 AC 144 ms
41,488 KB
testcase_20 AC 143 ms
41,344 KB
testcase_21 AC 147 ms
41,428 KB
testcase_22 WA -
testcase_23 AC 147 ms
41,312 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 144 ms
41,364 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 152 ms
40,864 KB
testcase_30 AC 147 ms
41,292 KB
testcase_31 AC 148 ms
41,352 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 151 ms
41,016 KB
testcase_35 AC 146 ms
41,264 KB
testcase_36 AC 145 ms
41,300 KB
testcase_37 AC 151 ms
41,152 KB
testcase_38 AC 145 ms
41,024 KB
testcase_39 AC 148 ms
41,152 KB
testcase_40 AC 159 ms
40,992 KB
testcase_41 AC 144 ms
41,116 KB
testcase_42 WA -
testcase_43 AC 146 ms
41,148 KB
testcase_44 AC 145 ms
41,288 KB
testcase_45 AC 146 ms
41,364 KB
testcase_46 AC 144 ms
41,668 KB
testcase_47 WA -
testcase_48 AC 145 ms
41,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Yuki204{
	public static void main(String[] arg){
		Scanner sc = new Scanner(System.in);
		int d,res = 0;
		String[] week0 = new String[2];
		String week;
		int[] hol = new int[14];
		boolean use = false;
		d = sc.nextInt();
		week0[0] = sc.next();
		week0[1] = sc.next();
		week = week0[0] + week0[1];
		for(int i = 0;i<14;i++){
			int h = 0;
			for(int j = 0;j<14-i;j++){
				if(week.charAt(i+j)=='o'){
					h++;
				}else{
					if(use == false){
						h += d;
						j += d-1;
						use = true;
					}else{
						break;
					}
				}
			}
			hol[i] = h;
			use = false;
		}
		for(int i = 0;i<14;i++){
			if(hol[i]>res)res = hol[i];
		}
		System.out.println(res);
	}
}
0