結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-12 21:38:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 1,000 ms
コード長 522 bytes
コンパイル時間 3,112 ms
コンパイル使用メモリ 73,480 KB
実行使用メモリ 55,884 KB
最終ジャッジ日時 2023-08-11 16:23:44
合計ジャッジ時間 8,501 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
55,884 KB
testcase_01 AC 135 ms
55,640 KB
testcase_02 AC 138 ms
55,704 KB
testcase_03 AC 134 ms
55,636 KB
testcase_04 AC 132 ms
55,792 KB
testcase_05 AC 132 ms
55,832 KB
testcase_06 AC 130 ms
55,780 KB
testcase_07 AC 132 ms
55,844 KB
testcase_08 AC 132 ms
53,340 KB
testcase_09 AC 134 ms
55,672 KB
testcase_10 AC 131 ms
55,708 KB
testcase_11 AC 134 ms
55,656 KB
testcase_12 AC 132 ms
55,720 KB
testcase_13 AC 133 ms
55,700 KB
testcase_14 AC 131 ms
55,564 KB
testcase_15 AC 137 ms
55,516 KB
testcase_16 AC 137 ms
55,884 KB
testcase_17 AC 129 ms
55,604 KB
testcase_18 AC 135 ms
55,620 KB
testcase_19 AC 133 ms
55,872 KB
testcase_20 AC 133 ms
55,264 KB
testcase_21 AC 136 ms
55,780 KB
testcase_22 AC 134 ms
55,864 KB
testcase_23 AC 135 ms
55,600 KB
testcase_24 AC 133 ms
55,576 KB
testcase_25 AC 131 ms
55,448 KB
testcase_26 AC 132 ms
55,584 KB
testcase_27 AC 134 ms
55,632 KB
testcase_28 AC 129 ms
55,260 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