結果
| 問題 |
No.342 一番ワロタww
|
| コンテスト | |
| ユーザー |
fal_rnd
|
| 提出日時 | 2016-10-27 01:06:01 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 522 bytes |
| コンパイル時間 | 2,290 ms |
| コンパイル使用メモリ | 83,328 KB |
| 実行使用メモリ | 41,404 KB |
| 最終ジャッジ日時 | 2024-11-24 03:56:55 |
| 合計ジャッジ時間 | 5,203 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 4 |
ソースコード
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.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));
}
}
}
fal_rnd