結果
問題 |
No.104 国道
|
ユーザー |
|
提出日時 | 2015-05-13 15:17:25 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 310 bytes |
コンパイル時間 | 389 ms |
コンパイル使用メモリ | 59,648 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-06 03:28:03 |
合計ジャッジ時間 | 1,057 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 4 WA * 12 |
ソースコード
#include <iostream> #include <math.h> using namespace std; int main() { string s; getline(cin,s); int c = pow(2,s.length());//左端の番号 int t = pow(2,s.length()); for (int i = 0; i < s.length(); ++i) { if(s.at(i)=='R'){ c += t / 2; }else{ t = t / 2; } } cout<<c<<endl; return 0; }