結果

問題 No.436 ccw
ユーザー tsunabittsunabit
提出日時 2019-06-08 02:49:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 185 ms / 2,000 ms
コード長 585 bytes
コンパイル時間 3,011 ms
コンパイル使用メモリ 75,208 KB
実行使用メモリ 42,168 KB
最終ジャッジ日時 2024-04-15 19:28:56
合計ジャッジ時間 7,223 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
40,328 KB
testcase_01 AC 112 ms
41,312 KB
testcase_02 AC 117 ms
41,288 KB
testcase_03 AC 122 ms
41,388 KB
testcase_04 AC 120 ms
41,364 KB
testcase_05 AC 117 ms
41,236 KB
testcase_06 AC 116 ms
41,308 KB
testcase_07 AC 114 ms
41,164 KB
testcase_08 AC 104 ms
40,028 KB
testcase_09 AC 118 ms
41,144 KB
testcase_10 AC 117 ms
41,212 KB
testcase_11 AC 117 ms
41,384 KB
testcase_12 AC 118 ms
41,400 KB
testcase_13 AC 116 ms
41,372 KB
testcase_14 AC 113 ms
41,084 KB
testcase_15 AC 114 ms
41,088 KB
testcase_16 AC 119 ms
40,168 KB
testcase_17 AC 114 ms
40,296 KB
testcase_18 AC 131 ms
41,392 KB
testcase_19 AC 136 ms
41,280 KB
testcase_20 AC 116 ms
40,112 KB
testcase_21 AC 181 ms
42,136 KB
testcase_22 AC 185 ms
42,092 KB
testcase_23 AC 183 ms
41,884 KB
testcase_24 AC 168 ms
42,052 KB
testcase_25 AC 184 ms
42,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;

public class No436 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner s = new Scanner(System.in);
        String str = s.next();
//        System.out.println(str.length());
        int b = str.indexOf("ccw");
//        System.out.println(b);
        if(b + 1 < str.length() / 2) {
//        	System.out.println("---1---");
        	System.out.println(b + 1);
        }else {
        	System.out.println(str.length() - b - 2);
        }
    }
}
0