結果

問題 No.104 国道
ユーザー リチウムリチウム
提出日時 2014-12-16 23:39:32
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 372 bytes
コンパイル時間 5,165 ms
コンパイル使用メモリ 71,860 KB
実行使用メモリ 56,192 KB
最終ジャッジ日時 2023-09-02 15:29:47
合計ジャッジ時間 7,851 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
56,064 KB
testcase_01 AC 116 ms
55,880 KB
testcase_02 AC 114 ms
55,564 KB
testcase_03 RE -
testcase_04 AC 112 ms
55,636 KB
testcase_05 AC 116 ms
55,680 KB
testcase_06 AC 117 ms
56,192 KB
testcase_07 AC 118 ms
55,324 KB
testcase_08 AC 119 ms
55,604 KB
testcase_09 AC 117 ms
55,576 KB
testcase_10 AC 116 ms
55,772 KB
testcase_11 AC 115 ms
55,328 KB
testcase_12 AC 116 ms
55,528 KB
testcase_13 AC 116 ms
55,540 KB
testcase_14 AC 117 ms
55,688 KB
testcase_15 AC 117 ms
53,248 KB
testcase_16 AC 113 ms
55,312 KB
testcase_17 AC 117 ms
55,568 KB
testcase_18 AC 120 ms
55,620 KB
testcase_19 AC 114 ms
55,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class ppp {
		
  public static void main(String[] args) {
	  Scanner sc=new Scanner(System.in);
	  String s=sc.next();
	  if(s.length()==0){
		  System.out.println(1);
		  return;
	  }
	  char c[]=s.toCharArray();
	 int n=1;
	  for(int i=0;i<c.length;i++){
		  n*=2;
		  if(c[i]=='R')n++;
	  }
	  System.out.println(n);
	 
  }}
0