結果
問題 | No.346 チワワ数え上げ問題 |
ユーザー | matsuyoshi30 |
提出日時 | 2018-09-11 23:01:24 |
言語 | Java21 (openjdk 21) |
結果 |
TLE
|
実行時間 | - |
コード長 | 651 bytes |
コンパイル時間 | 1,934 ms |
コンパイル使用メモリ | 71,460 KB |
実行使用メモリ | 65,432 KB |
最終ジャッジ日時 | 2023-09-06 15:01:08 |
合計ジャッジ時間 | 14,137 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1,479 ms
65,432 KB |
testcase_01 | AC | 289 ms
58,664 KB |
testcase_02 | AC | 133 ms
55,756 KB |
testcase_03 | AC | 178 ms
57,984 KB |
testcase_04 | AC | 1,122 ms
58,376 KB |
testcase_05 | AC | 120 ms
55,852 KB |
testcase_06 | AC | 708 ms
58,560 KB |
testcase_07 | AC | 381 ms
58,200 KB |
testcase_08 | AC | 609 ms
58,440 KB |
testcase_09 | AC | 1,665 ms
58,548 KB |
testcase_10 | TLE | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
ソースコード
import java.util.*; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); String s = in.next(); int l = s.length(); int count = 0; char[] c = new char[3]; for(int i=0; i<l; i++) { c[0] = s.charAt(i); for(int j=i+1; j<l; j++) { c[1] = s.charAt(j); for(int k=j+1; k<l; k++) { c[2] = s.charAt(k); String str = String.valueOf(c);; if(str.equals("cww")) count++; } } } System.out.println(count); } }