結果

問題 No.104 国道
ユーザー リチウムリチウム
提出日時 2014-12-16 23:27:22
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 355 bytes
コンパイル時間 3,561 ms
コンパイル使用メモリ 71,844 KB
実行使用メモリ 55,972 KB
最終ジャッジ日時 2023-09-02 15:24:15
合計ジャッジ時間 7,004 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,500 KB
testcase_01 AC 119 ms
55,444 KB
testcase_02 AC 120 ms
55,556 KB
testcase_03 RE -
testcase_04 AC 121 ms
55,524 KB
testcase_05 AC 119 ms
55,972 KB
testcase_06 AC 120 ms
55,548 KB
testcase_07 AC 120 ms
55,584 KB
testcase_08 AC 122 ms
55,644 KB
testcase_09 AC 122 ms
55,548 KB
testcase_10 AC 124 ms
55,304 KB
testcase_11 AC 121 ms
55,652 KB
testcase_12 AC 123 ms
55,312 KB
testcase_13 AC 123 ms
55,508 KB
testcase_14 AC 122 ms
55,268 KB
testcase_15 AC 123 ms
55,520 KB
testcase_16 AC 122 ms
55,504 KB
testcase_17 AC 121 ms
55,684 KB
testcase_18 AC 121 ms
55,692 KB
testcase_19 AC 122 ms
55,312 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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