結果

問題 No.104 国道
ユーザー ldsyb
提出日時 2016-03-01 12:42:00
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 207 bytes
コンパイル時間 519 ms
コンパイル使用メモリ 56,036 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-24 13:04:15
合計ジャッジ時間 1,062 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

int main(){
   int ans = 1;
   string s;
   cin >> s;
   for(char c : s){
      ans *= 2;
      if(c == 'R') ans++;
   }
   cout << ans << endl;
}
0