結果
問題 | No.342 一番ワロタww |
ユーザー | fal_rnd |
提出日時 | 2016-10-27 01:06:01 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 522 bytes |
コンパイル時間 | 3,963 ms |
コンパイル使用メモリ | 74,776 KB |
実行使用メモリ | 56,432 KB |
最終ジャッジ日時 | 2023-08-15 19:30:45 |
合計ジャッジ時間 | 5,537 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 120 ms
55,920 KB |
testcase_02 | AC | 120 ms
55,844 KB |
testcase_03 | AC | 121 ms
56,240 KB |
testcase_04 | AC | 119 ms
56,084 KB |
testcase_05 | AC | 122 ms
55,752 KB |
testcase_06 | WA | - |
testcase_07 | AC | 121 ms
55,908 KB |
testcase_08 | WA | - |
testcase_09 | AC | 118 ms
55,936 KB |
testcase_10 | AC | 120 ms
55,840 KB |
testcase_11 | AC | 121 ms
55,888 KB |
testcase_12 | AC | 120 ms
54,616 KB |
testcase_13 | AC | 119 ms
55,644 KB |
testcase_14 | AC | 118 ms
55,904 KB |
testcase_15 | AC | 118 ms
55,740 KB |
testcase_16 | WA | - |
ソースコード
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)); } } }