結果
| 問題 |
No.104 国道
|
| コンテスト | |
| ユーザー |
treeone
|
| 提出日時 | 2016-07-20 12:28:35 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 427 bytes |
| コンパイル時間 | 1,496 ms |
| コンパイル使用メモリ | 160,284 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-15 17:34:07 |
| 合計ジャッジ時間 | 1,808 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repp(i, n) rep(i, 0, n)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
using namespace std;
//yuki104
signed main(){
string s;
cin >> s;
int ans = 1;
rep(i, 0, s.size()){
if(s[i] == 'L') ans *= 2;
else ans = ans * 2 + 1;
}
cout << ans << endl;
}
treeone