結果

問題 No.104 国道
ユーザー GrenacheGrenache
提出日時 2015-09-23 20:02:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 427 bytes
コンパイル時間 3,299 ms
コンパイル使用メモリ 72,212 KB
実行使用メモリ 56,408 KB
最終ジャッジ日時 2023-09-26 14:38:36
合計ジャッジ時間 7,080 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,768 KB
testcase_01 AC 119 ms
55,964 KB
testcase_02 AC 119 ms
56,000 KB
testcase_03 AC 118 ms
55,876 KB
testcase_04 AC 118 ms
56,028 KB
testcase_05 AC 119 ms
54,436 KB
testcase_06 AC 119 ms
56,260 KB
testcase_07 AC 117 ms
55,520 KB
testcase_08 AC 116 ms
55,560 KB
testcase_09 AC 118 ms
56,080 KB
testcase_10 AC 119 ms
56,148 KB
testcase_11 AC 117 ms
56,192 KB
testcase_12 AC 116 ms
55,900 KB
testcase_13 AC 116 ms
55,596 KB
testcase_14 AC 116 ms
56,048 KB
testcase_15 AC 120 ms
56,408 KB
testcase_16 AC 120 ms
55,932 KB
testcase_17 AC 118 ms
56,060 KB
testcase_18 AC 119 ms
55,780 KB
testcase_19 AC 120 ms
55,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder104 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        char[] s = sc.nextLine().toCharArray();
        int ret = 1;
        for (int i = 0; i < s.length; i++) {
        	ret <<= 1;
        	if (s[i] == 'R') {
        		ret |= 1;
        	}
        }

        System.out.println(ret);
        
        sc.close();
    }
}
0