結果

問題 No.341 沈黙の期間
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-12 19:14:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 504 bytes
コンパイル時間 2,235 ms
コンパイル使用メモリ 76,212 KB
実行使用メモリ 55,904 KB
最終ジャッジ日時 2024-11-25 21:25:46
合計ジャッジ時間 4,721 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
53,700 KB
testcase_01 AC 119 ms
54,036 KB
testcase_02 AC 126 ms
53,840 KB
testcase_03 AC 123 ms
53,740 KB
testcase_04 AC 127 ms
53,880 KB
testcase_05 AC 126 ms
53,840 KB
testcase_06 AC 123 ms
55,904 KB
testcase_07 AC 120 ms
53,948 KB
testcase_08 AC 130 ms
53,864 KB
testcase_09 AC 116 ms
53,376 KB
testcase_10 AC 127 ms
54,216 KB
testcase_11 AC 121 ms
53,852 KB
testcase_12 AC 125 ms
53,812 KB
testcase_13 AC 125 ms
54,328 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