結果
問題 | No.104 国道 |
ユーザー |
![]() |
提出日時 | 2020-11-23 13:11:30 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 251 bytes |
コンパイル時間 | 3,563 ms |
コンパイル使用メモリ | 193,336 KB |
最終ジャッジ日時 | 2025-01-16 05:04:50 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){string S;cin>>S;int temp=1;int len=S.length();for(int i=0;i<len;i++){if(S.at(i)=='L') temp*=2;if(S.at(i)=='R') temp=temp*2+1;}cout<<temp<<endl;return 0;}