結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-12 21:38:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 1,000 ms
コード長 522 bytes
コンパイル時間 2,262 ms
コンパイル使用メモリ 76,228 KB
実行使用メモリ 41,488 KB
最終ジャッジ日時 2024-04-29 08:14:19
合計ジャッジ時間 6,435 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
40,948 KB
testcase_01 AC 121 ms
41,304 KB
testcase_02 AC 112 ms
41,148 KB
testcase_03 AC 105 ms
41,076 KB
testcase_04 AC 115 ms
41,124 KB
testcase_05 AC 104 ms
41,132 KB
testcase_06 AC 113 ms
40,092 KB
testcase_07 AC 109 ms
40,968 KB
testcase_08 AC 112 ms
40,960 KB
testcase_09 AC 118 ms
41,108 KB
testcase_10 AC 111 ms
41,060 KB
testcase_11 AC 123 ms
41,488 KB
testcase_12 AC 111 ms
39,924 KB
testcase_13 AC 115 ms
39,720 KB
testcase_14 AC 109 ms
41,268 KB
testcase_15 AC 115 ms
39,888 KB
testcase_16 AC 106 ms
41,340 KB
testcase_17 AC 113 ms
41,464 KB
testcase_18 AC 116 ms
40,232 KB
testcase_19 AC 113 ms
41,100 KB
testcase_20 AC 114 ms
40,864 KB
testcase_21 AC 106 ms
41,076 KB
testcase_22 AC 119 ms
40,952 KB
testcase_23 AC 120 ms
41,028 KB
testcase_24 AC 110 ms
41,128 KB
testcase_25 AC 114 ms
41,100 KB
testcase_26 AC 116 ms
40,184 KB
testcase_27 AC 107 ms
41,144 KB
testcase_28 AC 118 ms
41,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String A = sc.next();
        String B = sc.next();
        String C = A+B;
        int a = C.length();
        int r = 0;
        while(a>0){
            String t = "";
            for(int i=0; i<a; i++){
                t=t+"o";
            }
            if( C.indexOf(t)!=-1 ){
                break;
            }
            a--;
        }
        System.out.println(a);
    }
}
0