結果
問題 | No.104 国道 |
ユーザー |
![]() |
提出日時 | 2014-12-17 01:23:06 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 343 bytes |
コンパイル時間 | 1,041 ms |
コンパイル使用メモリ | 62,060 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-11 22:40:28 |
合計ジャッジ時間 | 1,185 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
#include <iostream> #include <algorithm> #include <sstream> #include <vector> using namespace std; int main(int argc, char *argv[]) { string s; getline(cin, s); int pos = 0; for (int i = 0; i < (int)s.length(); ++i) { pos *= 2; pos += s[i] == 'R'; } pos += (1 << s.length()); cout << pos << endl; return 0; }