結果

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

ソースコード

diff #

#include <iostream>
using namespace std;

int main() {
    int ans = 1;
    string s;
    getline(cin,s);
    for (auto c : s) {
        ans <<= 1;
        ans = c == 'L' ? ans : ans + 1;
    }
    cout << ans << endl;
    return 0;
}
0