結果
問題 | No.104 国道 |
ユーザー |
|
提出日時 | 2017-01-09 06:21:16 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 283 bytes |
コンパイル時間 | 623 ms |
コンパイル使用メモリ | 55,500 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-18 00:00:30 |
合計ジャッジ時間 | 1,393 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
#include <iostream>using namespace std;int main() {string s;cin >> s;int road_num = 1;for(int i=0;i<s.size();i++) {if(s[i]=='L')road_num = 2*road_num;elseroad_num = 2*road_num+1;}cout << road_num << endl;}