結果
問題 | No.104 国道 |
ユーザー |
![]() |
提出日時 | 2022-11-17 21:30:49 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 331 bytes |
コンパイル時間 | 1,405 ms |
コンパイル使用メモリ | 157,940 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 08:05:38 |
合計ジャッジ時間 | 1,758 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
#include <bits/stdc++.h> using namespace std; #include <stdio.h> #include <iomanip> #include <iostream> #include <string> #include <algorithm> int main(){ string a; cin >> a; int number =1; for(int i=0;i<a.size();i++){ if(a.at(i)=='R'){ number=number*2+1; } else number=number*2; } cout << number; }