結果

問題 No.104 国道
ユーザー dazydazy
提出日時 2016-09-11 03:41:45
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 370 bytes
コンパイル時間 3,391 ms
コンパイル使用メモリ 74,472 KB
実行使用メモリ 41,408 KB
最終ジャッジ日時 2024-04-28 10:13:30
合計ジャッジ時間 6,792 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
40,868 KB
testcase_01 AC 111 ms
39,752 KB
testcase_02 AC 123 ms
40,892 KB
testcase_03 RE -
testcase_04 AC 121 ms
40,952 KB
testcase_05 AC 109 ms
40,268 KB
testcase_06 AC 125 ms
41,408 KB
testcase_07 AC 127 ms
40,900 KB
testcase_08 AC 124 ms
40,936 KB
testcase_09 AC 124 ms
40,884 KB
testcase_10 AC 124 ms
40,788 KB
testcase_11 AC 110 ms
39,940 KB
testcase_12 AC 119 ms
40,984 KB
testcase_13 AC 124 ms
40,776 KB
testcase_14 AC 121 ms
40,980 KB
testcase_15 AC 128 ms
41,064 KB
testcase_16 AC 110 ms
40,132 KB
testcase_17 AC 125 ms
41,236 KB
testcase_18 AC 127 ms
41,272 KB
testcase_19 AC 126 ms
41,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Run {
    public static void main (String arg[]) {
        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        int 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