結果
問題 |
No.342 一番ワロタww
|
ユーザー |
![]() |
提出日時 | 2016-10-27 00:48:14 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 456 bytes |
コンパイル時間 | 2,050 ms |
コンパイル使用メモリ | 76,348 KB |
実行使用メモリ | 54,224 KB |
最終ジャッジ日時 | 2024-11-24 03:56:28 |
合計ジャッジ時間 | 4,911 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 WA * 4 |
ソースコード
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)); } } }