結果

問題 No.342 一番ワロタww
ユーザー mizunomi32mizunomi32
提出日時 2016-03-01 10:03:03
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 825 bytes
コンパイル時間 3,349 ms
コンパイル使用メモリ 75,260 KB
実行使用メモリ 57,972 KB
最終ジャッジ日時 2023-10-24 19:17:55
合計ジャッジ時間 6,431 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class main {
    public static void main(String[] args){

        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        String[] str={""};
        int[] scount={0};
        int slen = S.length();
        String buf = "";
        int count =0 ,j=1;

        for(int i =0;i< slen;i++){

            if (S.charAt(i) == 'w'){
                count++;
                j=i+1;
                for(int k = 0;scount[k]<count;k++){
                    str[k]=buf;
                    scount[k]=count;
                }

            }else {
                count = 0;
                buf = S.substring(j,i);

            }
        }
        System.out.println(str[0]);
        for(int i=1;scount[i] == scount[0];i++){
            System.out.println(str[i]);
        }

    }
}
0