結果

問題 No.342 一番ワロタww
ユーザー fal_rnd
提出日時 2016-10-27 01:00:47
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 491 bytes
コンパイル時間 2,077 ms
コンパイル使用メモリ 76,448 KB
実行使用メモリ 54,356 KB
最終ジャッジ日時 2024-11-24 03:56:33
合計ジャッジ時間 4,870 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 7 WA * 7
権限があれば一括ダウンロードができます

ソースコード

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().replaceFirst("w+", "");
		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