結果

問題 No.104 国道
ユーザー カニ戯(ryカニ戯(ry
提出日時 2015-02-25 11:05:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 218 bytes
コンパイル時間 2,159 ms
コンパイル使用メモリ 71,604 KB
実行使用メモリ 56,096 KB
最終ジャッジ日時 2023-09-06 04:21:46
合計ジャッジ時間 5,619 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,400 KB
testcase_01 AC 121 ms
53,556 KB
testcase_02 AC 121 ms
55,848 KB
testcase_03 AC 120 ms
55,980 KB
testcase_04 AC 117 ms
55,696 KB
testcase_05 AC 116 ms
55,444 KB
testcase_06 AC 121 ms
55,644 KB
testcase_07 AC 116 ms
55,840 KB
testcase_08 AC 118 ms
55,468 KB
testcase_09 AC 126 ms
55,512 KB
testcase_10 AC 119 ms
55,924 KB
testcase_11 AC 115 ms
56,096 KB
testcase_12 AC 129 ms
55,652 KB
testcase_13 AC 120 ms
55,800 KB
testcase_14 AC 119 ms
55,800 KB
testcase_15 AC 121 ms
55,888 KB
testcase_16 AC 121 ms
56,072 KB
testcase_17 AC 118 ms
55,792 KB
testcase_18 AC 118 ms
53,676 KB
testcase_19 AC 120 ms
55,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] a) {
		String S=new Scanner(System.in).nextLine();
		int n=1;for(char C:S.toCharArray())n=2*n+(C=='L'?0:1);
		System.out.println(n);
	}
}
0