結果
問題 | No.342 一番ワロタww |
ユーザー | fal_rnd |
提出日時 | 2016-10-27 01:00:47 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 491 bytes |
コンパイル時間 | 2,228 ms |
コンパイル使用メモリ | 74,216 KB |
実行使用メモリ | 55,980 KB |
最終ジャッジ日時 | 2023-08-15 19:30:23 |
合計ジャッジ時間 | 5,178 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 124 ms
55,772 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 126 ms
55,788 KB |
testcase_05 | AC | 124 ms
55,460 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 123 ms
54,248 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | AC | 123 ms
55,668 KB |
testcase_14 | AC | 120 ms
55,540 KB |
testcase_15 | AC | 126 ms
55,340 KB |
testcase_16 | AC | 125 ms
53,612 KB |
ソースコード
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)); } } }