結果
| 問題 | No.104 国道 |
| コンテスト | |
| ユーザー |
hanorver
|
| 提出日時 | 2015-09-01 21:44:23 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 282 bytes |
| 記録 | |
| コンパイル時間 | 370 ms |
| コンパイル使用メモリ | 54,772 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-18 17:31:08 |
| 合計ジャッジ時間 | 1,032 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
#include<iostream>
#include<string>
int main() {
std::string str;
std::getline(std::cin, str);
int road = 1;
for (int i = 0; i < str.length(); i++) {
if (str[i] == 'L') {
road *= 2;
} else {
road = road * 2 + 1;
}
}
std::cout << road << std::endl;
return 0;
}
hanorver