結果
| 問題 | 
                            No.104 国道
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-09-19 20:36:18 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 1 ms / 5,000 ms | 
| コード長 | 249 bytes | 
| コンパイル時間 | 307 ms | 
| コンパイル使用メモリ | 28,672 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-19 20:36:22 | 
| 合計ジャッジ時間 | 783 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 16 | 
ソースコード
#include <stdio.h>
int main(void) {
    char s[31] = "";
    scanf("%s", s);
    int result = 1;
    int i;
    for (i = 0; '\0' != s[i]; i++) {
        result = 2 * result + ('L' == s[i] ? 0 : 1);
    }
    printf("%d\n", result);
    return 0;
}