結果

問題 No.104 国道
ユーザー dazydazy
提出日時 2016-09-11 03:50:15
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 405 bytes
コンパイル時間 3,380 ms
コンパイル使用メモリ 79,860 KB
実行使用メモリ 41,248 KB
最終ジャッジ日時 2024-04-28 10:14:12
合計ジャッジ時間 6,721 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
40,860 KB
testcase_01 AC 111 ms
39,784 KB
testcase_02 AC 124 ms
40,984 KB
testcase_03 RE -
testcase_04 AC 121 ms
40,784 KB
testcase_05 AC 122 ms
41,096 KB
testcase_06 AC 123 ms
40,872 KB
testcase_07 AC 124 ms
41,232 KB
testcase_08 AC 127 ms
41,020 KB
testcase_09 AC 128 ms
40,760 KB
testcase_10 AC 129 ms
41,080 KB
testcase_11 AC 112 ms
40,152 KB
testcase_12 AC 110 ms
39,988 KB
testcase_13 AC 126 ms
41,128 KB
testcase_14 AC 129 ms
40,964 KB
testcase_15 AC 127 ms
41,040 KB
testcase_16 AC 126 ms
41,164 KB
testcase_17 AC 120 ms
40,896 KB
testcase_18 AC 126 ms
40,724 KB
testcase_19 AC 123 ms
41,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Run {
    public static void main (String arg[]) {
        Scanner scan = new Scanner(System.in);
        scan.useDelimiter("\\n");
        String S = scan.next();
        long Road = 1;
        for (int i = 0; i < S.length(); i++) {
            if (S.charAt(i)=='L') Road = Road*2;
            else Road = Road*2 + 1;
        }
        System.out.println(Road);
    }
}
0