結果
問題 | No.104 国道 |
ユーザー |
![]() |
提出日時 | 2020-04-22 23:43:33 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 253 bytes |
コンパイル時間 | 2,016 ms |
コンパイル使用メモリ | 193,408 KB |
最終ジャッジ日時 | 2025-01-09 22:41:54 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main() {string S;cin >> S;int ans = 1;for (unsigned i = 0; i < S.size(); ++i) {if (S[i] == 'L') {ans += ans;} else {ans += ans + 1;}}cout << ans << endl;}