結果
問題 | No.104 国道 |
ユーザー |
![]() |
提出日時 | 2014-12-17 01:28:59 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 662 bytes |
コンパイル時間 | 869 ms |
コンパイル使用メモリ | 83,932 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-11 22:43:42 |
合計ジャッジ時間 | 1,598 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
#include <algorithm>#include <vector>#include <cfloat>#include <string>#include <cmath>#include <set>#include <cstdlib>#include <map>#include <ctime>#include <iomanip>#include <functional>#include <deque>#include <iostream>#include <cstring>#include <queue>#include <cstdio>#include <stack>#include <climits>#include <sys/time.h>#include <cctype>using namespace std;typedef long long ll;int main() {string str;cin >> str;ll ans = 1;for (int i = 0; i < str.size(); i++) {if (str[i] == 'L') {ans = ans*2;}else {ans = ans*2+1;}}cout << ans << endl;}