結果

問題 No.104 国道
ユーザー ikd
提出日時 2015-11-01 16:43:02
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 302 bytes
コンパイル時間 582 ms
コンパイル使用メモリ 59,912 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 06:51:51
合計ジャッジ時間 1,295 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>

using namespace std;

int main(){

    string str;
    cin>> str;

    int len = str.size();
    int n = 1;
    for(int i=0; i<len; i++){
        n *= 2;
        if(str[i]=='R') n++;
    }
    cout<< n<< endl;

    return 0;
}
0