結果

問題 No.104 国道
ユーザー fal_rndfal_rnd
提出日時 2017-07-19 00:00:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 251 bytes
コンパイル時間 1,755 ms
コンパイル使用メモリ 74,048 KB
実行使用メモリ 41,520 KB
最終ジャッジ日時 2024-04-17 02:05:40
合計ジャッジ時間 4,587 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
41,492 KB
testcase_01 AC 104 ms
41,376 KB
testcase_02 AC 103 ms
41,484 KB
testcase_03 AC 116 ms
41,284 KB
testcase_04 AC 99 ms
41,064 KB
testcase_05 AC 113 ms
41,324 KB
testcase_06 AC 123 ms
41,316 KB
testcase_07 AC 114 ms
40,944 KB
testcase_08 AC 107 ms
41,036 KB
testcase_09 AC 109 ms
41,268 KB
testcase_10 AC 110 ms
41,300 KB
testcase_11 AC 108 ms
41,372 KB
testcase_12 AC 103 ms
41,056 KB
testcase_13 AC 107 ms
41,344 KB
testcase_14 AC 105 ms
41,140 KB
testcase_15 AC 105 ms
41,208 KB
testcase_16 AC 105 ms
41,520 KB
testcase_17 AC 104 ms
41,144 KB
testcase_18 AC 105 ms
41,160 KB
testcase_19 AC 104 ms
41,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class C{
	public static void main(String[]$){
		int v=1;
		Scanner s=new Scanner(System.in);
		if(s.hasNext())
		for(char c:s.next().toCharArray()) {
			if(c=='L')v*=2;
			if(c=='R')v+=v+1;
		}
		System.out.println(v);
	}
}
0