結果

問題 No.104 国道
ユーザー トミー
提出日時 2024-01-16 00:26:51
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 315 bytes
コンパイル時間 2,130 ms
コンパイル使用メモリ 193,812 KB
最終ジャッジ日時 2025-02-18 20:14:03
ジャッジサーバーID
(参考情報)
judge1 / 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;
    }
    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