結果

問題 No.342 一番ワロタww
ユーザー fal_rndfal_rnd
提出日時 2016-10-27 19:46:02
言語 Java19
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 529 bytes
コンパイル時間 2,837 ms
コンパイル使用メモリ 74,128 KB
実行使用メモリ 56,136 KB
最終ジャッジ日時 2023-08-05 16:27:27
合計ジャッジ時間 6,228 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,776 KB
testcase_01 AC 129 ms
55,776 KB
testcase_02 AC 127 ms
55,724 KB
testcase_03 AC 127 ms
55,948 KB
testcase_04 AC 127 ms
55,764 KB
testcase_05 AC 123 ms
54,116 KB
testcase_06 AC 121 ms
55,480 KB
testcase_07 AC 112 ms
56,136 KB
testcase_08 AC 125 ms
56,024 KB
testcase_09 AC 123 ms
55,872 KB
testcase_10 AC 121 ms
55,848 KB
testcase_11 AC 119 ms
55,508 KB
testcase_12 AC 121 ms
55,888 KB
testcase_13 AC 117 ms
55,632 KB
testcase_14 AC 114 ms
55,700 KB
testcase_15 AC 118 ms
55,768 KB
testcase_16 AC 119 ms
55,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class A {

	static Scanner s = new Scanner(System.in);
	static String  w = "w";


	public static void main(String[] args) {
		String in = s.nextLine();
		if(in.startsWith(w))
			in = in.replaceFirst("w+", "");
		in = in.substring(0, in.lastIndexOf(w)+1);

		if(!in.contains(w)) {
			System.out.println();
			return;
		}


		String ww = w;
		while(in.contains(ww+w)) {
			ww+=w;
		}
		String[] ss = in.split(ww);
		for(String s:ss) {
			System.out.println(s.substring(s.lastIndexOf(w)+1));
		}
	}
}
0