結果
| 問題 |
No.104 国道
|
| コンテスト | |
| ユーザー |
water
|
| 提出日時 | 2020-03-08 12:52:58 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 302 bytes |
| コンパイル時間 | 1,729 ms |
| コンパイル使用メモリ | 165,768 KB |
| 実行使用メモリ | 6,816 KB |
| 最終ジャッジ日時 | 2024-11-07 00:37:57 |
| 合計ジャッジ時間 | 10,866 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 1 TLE * 1 -- * 2 |
| other | -- * 16 |
ソースコード
#include <bits/stdc++.h>
#define INF 990000000
//2
using namespace std;
int main() {
string s;
scanf("%s", &s);
int a=1;
if((int )s.size()==0){
cout <<a<<endl;
}else{
for(int i=0;i<(int )s.size();i++){
switch(s[i]){
case 'L':a+=(a);
break;
case 'R':a+=(a+1);
break;
}
}
cout <<a<<endl;
}
}
water