結果

問題 No.345 最小チワワ問題
ユーザー fal_rndfal_rnd
提出日時 2017-06-27 20:06:17
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 205 bytes
コンパイル時間 2,042 ms
コンパイル使用メモリ 74,924 KB
実行使用メモリ 54,328 KB
最終ジャッジ日時 2024-04-15 03:30:10
合計ジャッジ時間 7,369 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
54,116 KB
testcase_01 AC 134 ms
54,280 KB
testcase_02 AC 130 ms
53,848 KB
testcase_03 AC 135 ms
53,840 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 133 ms
54,024 KB
testcase_08 AC 135 ms
54,192 KB
testcase_09 AC 131 ms
54,124 KB
testcase_10 AC 134 ms
54,260 KB
testcase_11 AC 132 ms
54,200 KB
testcase_12 AC 137 ms
54,012 KB
testcase_13 AC 138 ms
54,216 KB
testcase_14 WA -
testcase_15 AC 135 ms
54,096 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 132 ms
54,028 KB
testcase_20 AC 134 ms
54,096 KB
testcase_21 AC 136 ms
53,988 KB
testcase_22 AC 132 ms
54,104 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 133 ms
54,280 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 134 ms
54,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

class A{
	public static void main(String[]$){
		String c=new java.util.Scanner(System.in).next();
		System.out.println(c.matches(".*c.*w.*w.*")?c.length()-c.replaceFirst("c.*?w.*?w","").length():-1);
	}
}
0