結果

問題 No.436 ccw
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 22:10:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 201 ms / 2,000 ms
コード長 300 bytes
コンパイル時間 1,953 ms
コンパイル使用メモリ 72,016 KB
実行使用メモリ 40,396 KB
最終ジャッジ日時 2023-08-17 04:25:17
合計ジャッジ時間 6,850 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
38,920 KB
testcase_01 AC 119 ms
38,824 KB
testcase_02 AC 115 ms
39,016 KB
testcase_03 AC 117 ms
39,212 KB
testcase_04 AC 116 ms
39,204 KB
testcase_05 AC 116 ms
39,064 KB
testcase_06 AC 116 ms
38,688 KB
testcase_07 AC 115 ms
39,092 KB
testcase_08 AC 117 ms
39,072 KB
testcase_09 AC 114 ms
39,616 KB
testcase_10 AC 115 ms
38,912 KB
testcase_11 AC 115 ms
39,176 KB
testcase_12 AC 114 ms
39,000 KB
testcase_13 AC 114 ms
38,828 KB
testcase_14 AC 111 ms
38,908 KB
testcase_15 AC 112 ms
39,136 KB
testcase_16 AC 129 ms
38,848 KB
testcase_17 AC 120 ms
39,200 KB
testcase_18 AC 139 ms
38,784 KB
testcase_19 AC 128 ms
39,316 KB
testcase_20 AC 129 ms
39,316 KB
testcase_21 AC 194 ms
40,396 KB
testcase_22 AC 201 ms
39,980 KB
testcase_23 AC 192 ms
40,216 KB
testcase_24 AC 196 ms
40,188 KB
testcase_25 AC 195 ms
40,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = S.indexOf("cw");
        int b = S.length()-a-1;
        int min = Math.min(a,b);
        System.out.println(min);
    }
}
0