結果
問題 | No.104 国道 |
ユーザー | なお |
提出日時 | 2014-12-16 23:22:43 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 336 bytes |
コンパイル時間 | 1,491 ms |
コンパイル使用メモリ | 158,168 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-11 21:56:55 |
合計ジャッジ時間 | 2,105 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) const int MOD = 1000000007; int main(){ string s; cin >> s; int k = 1; REP(i,s.size()){ k*=2; if(s[i]=='R') k++; } cout << k << endl; return 0; }