結果
問題 | No.104 国道 |
ユーザー |
![]() |
提出日時 | 2023-08-03 19:00:56 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 5 ms / 5,000 ms |
コード長 | 436 bytes |
コンパイル時間 | 715 ms |
コンパイル使用メモリ | 103,788 KB |
最終ジャッジ日時 | 2025-02-15 21:51:05 |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
#include<iostream> #include<string> #include<algorithm> #include<cctype> #include<set> #include<bitset> #include<math.h> #include<map> #include<queue> #include<iomanip> using namespace std; int main(){ long long now = 1, l = -1, r = -1; string s; if (cin >> s){ for (int i = 0; i < s.size(); i++){ if (s[i] == 'L') now *= 2; else now = now*2 + 1; } } cout << now << endl; }