結果

問題 No.104 国道
ユーザー dazydazy
提出日時 2016-09-12 02:03:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 42 ms / 5,000 ms
コード長 403 bytes
コンパイル時間 4,422 ms
コンパイル使用メモリ 71,652 KB
実行使用メモリ 51,352 KB
最終ジャッジ日時 2023-08-10 18:56:05
合計ジャッジ時間 5,330 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,136 KB
testcase_01 AC 41 ms
49,224 KB
testcase_02 AC 41 ms
49,168 KB
testcase_03 AC 41 ms
49,224 KB
testcase_04 AC 40 ms
51,352 KB
testcase_05 AC 39 ms
49,404 KB
testcase_06 AC 40 ms
49,224 KB
testcase_07 AC 40 ms
49,144 KB
testcase_08 AC 39 ms
49,132 KB
testcase_09 AC 38 ms
49,376 KB
testcase_10 AC 39 ms
49,280 KB
testcase_11 AC 39 ms
49,408 KB
testcase_12 AC 40 ms
47,428 KB
testcase_13 AC 39 ms
49,400 KB
testcase_14 AC 41 ms
49,584 KB
testcase_15 AC 39 ms
49,144 KB
testcase_16 AC 38 ms
49,228 KB
testcase_17 AC 39 ms
49,324 KB
testcase_18 AC 40 ms
49,388 KB
testcase_19 AC 40 ms
49,232 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;

public class Run {
    public static void main (String arg[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        int Road = 1;
        for (int i = 0; i < S.length(); i++) {
            Road *= 2;
            if (S.charAt(i)=='R') Road++;
        }
        System.out.println(Road);
    }
}
0