結果

問題 No.341 沈黙の期間
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-12 19:14:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 5,000 ms
コード長 504 bytes
コンパイル時間 2,231 ms
コンパイル使用メモリ 73,904 KB
実行使用メモリ 56,072 KB
最終ジャッジ日時 2023-08-17 03:48:13
合計ジャッジ時間 5,341 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,624 KB
testcase_01 AC 126 ms
55,860 KB
testcase_02 AC 126 ms
55,680 KB
testcase_03 AC 127 ms
55,708 KB
testcase_04 AC 129 ms
55,508 KB
testcase_05 AC 130 ms
55,712 KB
testcase_06 AC 130 ms
55,896 KB
testcase_07 AC 127 ms
55,696 KB
testcase_08 AC 132 ms
55,712 KB
testcase_09 AC 130 ms
55,540 KB
testcase_10 AC 133 ms
55,884 KB
testcase_11 AC 125 ms
55,696 KB
testcase_12 AC 124 ms
56,072 KB
testcase_13 AC 138 ms
55,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = S.length();
        int b = -1;
        while(true){
            String temp = "";
            for(int i=0; i<a; i++){
                temp = temp + "…" ;
            }
            b=S.indexOf(temp);
            if(b!=-1){
                break;
            }
            a--;
        }
        System.out.println(a);
    }
}
0