結果

問題 No.104 国道
ユーザー kanra661kanra661
提出日時 2014-12-17 00:35:14
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 356 bytes
コンパイル時間 2,156 ms
コンパイル使用メモリ 71,480 KB
実行使用メモリ 55,844 KB
最終ジャッジ日時 2023-09-02 15:33:51
合計ジャッジ時間 5,740 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,560 KB
testcase_01 AC 120 ms
55,464 KB
testcase_02 AC 119 ms
55,528 KB
testcase_03 RE -
testcase_04 AC 122 ms
55,516 KB
testcase_05 AC 121 ms
55,484 KB
testcase_06 AC 121 ms
53,748 KB
testcase_07 AC 122 ms
55,432 KB
testcase_08 AC 123 ms
55,592 KB
testcase_09 AC 121 ms
55,536 KB
testcase_10 AC 121 ms
55,844 KB
testcase_11 AC 121 ms
55,820 KB
testcase_12 AC 119 ms
55,804 KB
testcase_13 AC 120 ms
55,520 KB
testcase_14 AC 122 ms
55,236 KB
testcase_15 AC 121 ms
55,512 KB
testcase_16 AC 124 ms
55,712 KB
testcase_17 AC 122 ms
55,524 KB
testcase_18 AC 122 ms
55,436 KB
testcase_19 AC 121 ms
55,524 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		sc.close();
		char dir[] = s.toCharArray();
		int lNum = 1;
		for (int i = 0; i < dir.length; i++) {
				lNum *= 2 ;
				if(dir[i] == 'R') lNum++;
		}
		System.out.println(lNum);
	}

}
0