結果
問題 | No.104 国道 |
ユーザー |
![]() |
提出日時 | 2017-11-22 04:37:39 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 416 bytes |
コンパイル時間 | 713 ms |
コンパイル使用メモリ | 85,496 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-26 08:44:03 |
合計ジャッジ時間 | 1,494 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
#include<iostream> #include<string> #include<algorithm> #include<cmath> #include<math.h> #include<iomanip> #include<stdio.h> #include<random> #include<ctime> #include<cstdlib> using namespace std; int main(){ int ans=1; string s; cin >> s; for(int i=0; i<s.size(); i++){ if(s[i]=='L'){ ans*=2; } else if(s[i]=='R'){ ans*=2; ans+=1; } } cout << ans << endl; return 0; }