結果

問題 No.104 国道
ユーザー focus
提出日時 2018-01-23 22:57:19
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 352 bytes
コンパイル時間 652 ms
コンパイル使用メモリ 63,440 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-26 03:53:10
合計ジャッジ時間 1,596 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cmath>
using namespace std;
int main(){
    int N=1;
    string str;
    cin >> str;
    for(int i=0;str[i]!='\0';i++){
        if(str[i]=='L'){
            N*=2;
        }
        else{
            N*=2;
            N++;
        }
    }
    cout << N;
    return 0;
}

0