結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー nCk_cvnCk_cv
提出日時 2015-11-28 01:16:22
言語 Java19
(openjdk 21)
結果
AC  
実行時間 161 ms / 1,000 ms
コード長 517 bytes
コンパイル時間 4,204 ms
コンパイル使用メモリ 79,108 KB
実行使用メモリ 57,116 KB
最終ジャッジ日時 2023-08-11 16:01:47
合計ジャッジ時間 8,744 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 155 ms
56,988 KB
testcase_01 AC 154 ms
56,768 KB
testcase_02 AC 149 ms
56,856 KB
testcase_03 AC 155 ms
56,784 KB
testcase_04 AC 157 ms
56,704 KB
testcase_05 AC 152 ms
57,016 KB
testcase_06 AC 156 ms
56,764 KB
testcase_07 AC 156 ms
56,716 KB
testcase_08 AC 155 ms
56,804 KB
testcase_09 AC 152 ms
54,520 KB
testcase_10 AC 155 ms
56,740 KB
testcase_11 AC 155 ms
56,820 KB
testcase_12 AC 155 ms
57,036 KB
testcase_13 AC 161 ms
57,028 KB
testcase_14 AC 155 ms
56,856 KB
testcase_15 AC 157 ms
54,948 KB
testcase_16 AC 155 ms
56,620 KB
testcase_17 AC 153 ms
56,892 KB
testcase_18 AC 154 ms
56,852 KB
testcase_19 AC 154 ms
56,848 KB
testcase_20 AC 152 ms
57,116 KB
testcase_21 AC 152 ms
57,004 KB
testcase_22 AC 153 ms
56,968 KB
testcase_23 AC 155 ms
56,776 KB
testcase_24 AC 152 ms
57,068 KB
testcase_25 AC 155 ms
56,812 KB
testcase_26 AC 154 ms
56,816 KB
testcase_27 AC 151 ms
56,704 KB
testcase_28 AC 150 ms
56,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.util.Map.Entry;
import java.math.*;
import java.awt.geom.*;
import java.io.*;
      
      
public class Main {	

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String in = sc.next() + sc.next() + "x";
		
		char[] str = in.toCharArray();
		int MAX = 0;
		for(int i = 0; i < str.length; i++) {
			for(int j = 0; j < str.length; j++) {
				if(str[i + j] != 'o') {
					MAX = Math.max(MAX, j);
					break;
				}
			}
		}
		System.out.println(MAX);
	}
}
0