結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー ぴろず
提出日時 2015-05-08 22:22:08
言語 Java
(openjdk 23)
結果
AC  
実行時間 125 ms / 1,000 ms
コード長 476 bytes
コンパイル時間 2,212 ms
コンパイル使用メモリ 74,476 KB
実行使用メモリ 54,780 KB
最終ジャッジ日時 2024-11-18 08:54:02
合計ジャッジ時間 6,302 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

package no203;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] c = new char[14];
		for(int i=0;i<2;i++) {
			char[] s = sc.next().toCharArray();
			for(int j=0;j<7;j++) {
				c[i*7+j] = s[j];
			}
		}
		int max = 0;
		int now = 0;
		for(int i=0;i<14;i++) {
			if (c[i] == 'o') {
				now++;
				max = Math.max(max, now);
			}else{
				now = 0;
			}
		}
		System.out.println(max);
	}

}
0