結果

問題 No.104 国道
ユーザー トミー
提出日時 2024-01-16 00:27:45
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 1,967 ms
コンパイル使用メモリ 192,416 KB
最終ジャッジ日時 2025-02-18 20:14:11
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
    string s;
    if(!(cin>>s)){
        cout<<1<<endl;
    }
    else{
        for(auto& i:s){
            if(i=='R'){
                i='1';
            }
            else{
                i='0';
            }
        }
    }
    int n=stoi('1'+s,nullptr,2);
    cout<<n<<endl;
    //system("pause");
}
0