結果
| 問題 |
No.104 国道
|
| コンテスト | |
| ユーザー |
koyumeishi
|
| 提出日時 | 2014-12-16 23:23:25 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 388 bytes |
| コンパイル時間 | 662 ms |
| コンパイル使用メモリ | 73,252 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-11 21:57:12 |
| 合計ジャッジ時間 | 1,510 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
#include <iostream>
#include <vector>
#include <cstdio>
#include <sstream>
#include <map>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>
using namespace std;
int main(){
string s;
cin >> s;
long long ans = 1;
for(int i=0; i<s.size(); i++){
if(s[i] == 'L') ans = 2*ans;
else ans = 2*ans + 1;
}
cout << ans << endl;
return 0;
}
koyumeishi