結果

問題 No.342 一番ワロタww
ユーザー fal_rndfal_rnd
提出日時 2016-10-27 00:48:14
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 456 bytes
コンパイル時間 2,297 ms
コンパイル使用メモリ 76,676 KB
実行使用メモリ 54,292 KB
最終ジャッジ日時 2024-05-03 06:14:35
合計ジャッジ時間 4,583 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 109 ms
53,988 KB
testcase_02 AC 114 ms
53,552 KB
testcase_03 AC 99 ms
52,932 KB
testcase_04 AC 109 ms
54,016 KB
testcase_05 AC 101 ms
52,944 KB
testcase_06 WA -
testcase_07 AC 119 ms
53,964 KB
testcase_08 WA -
testcase_09 AC 121 ms
54,016 KB
testcase_10 AC 120 ms
53,912 KB
testcase_11 AC 123 ms
54,064 KB
testcase_12 AC 120 ms
54,140 KB
testcase_13 AC 119 ms
54,076 KB
testcase_14 AC 115 ms
54,096 KB
testcase_15 AC 106 ms
52,816 KB
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class A {
	static Scanner s = new Scanner(System.in);
	static String  w = "w";
	public static void main(String[] args) {
		String in = s.nextLine();
		String ww = w;
		if(in.matches("w+")||!in.contains("w")) {
			System.out.println();
			return;
		}
		while(in.contains(ww+w)) {
			ww+=w;
		}
		String[] ss = in.split(ww);
		for(String s:ss) {
			if(!s.isEmpty())
				System.out.println(s.substring(s.lastIndexOf(w)+1));
		}
	}
}
0