結果
問題 | No.104 国道 |
ユーザー |
![]() |
提出日時 | 2015-04-26 18:13:50 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 310 bytes |
コンパイル時間 | 409 ms |
コンパイル使用メモリ | 57,336 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 02:50:29 |
合計ジャッジ時間 | 1,125 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
#include "iostream" #include "algorithm" using namespace std; int main() { string a; int ans =1; cin >> a; for (int i = 0; i < a.length(); ++i) { if (a[i] == 'R') { ans = ans *2 + 1; }else { ans *= 2; } } cout<<ans<<endl; return 0; }