結果

問題 No.104 国道
ユーザー Eclair1015
提出日時 2018-07-10 20:11:00
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 287 bytes
コンパイル時間 438 ms
コンパイル使用メモリ 59,640 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 19:26:35
合計ジャッジ時間 1,435 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include<string>

using namespace std;
int main(){
	string s;
	int n = 1;
	cin >> s;
	for (int i = 0; i < s.size(); i++) {
		if (s[i] == 'L') {
			n *= 2;
		} else {
			n *= 2;
			n += 1;
		}
	}
	cout << n << "\n";
	return 0;
}
0