結果

問題 No.104 国道
ユーザー Pachicobue
提出日時 2017-10-25 00:33:35
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 180 bytes
コンパイル時間 565 ms
コンパイル使用メモリ 63,872 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-21 17:57:49
合計ジャッジ時間 1,151 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main()
{
string s;
cin >> s;
int n = 1;
for(const char c: s){
if(c == 'L'){
n*=2;
} else {
n= 2*n+1;
}
}
cout << n << endl;
return 0;
}
0