結果
| 問題 | 
                            No.104 国道
                             | 
                    
| コンテスト | |
| ユーザー | 
                             asdfghjkl;
                         | 
                    
| 提出日時 | 2022-08-15 02:25:44 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 299 bytes | 
| コンパイル時間 | 89 ms | 
| コンパイル使用メモリ | 28,416 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-10-01 16:26:12 | 
| 合計ジャッジ時間 | 2,126 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 RE * 3 | 
| other | AC * 4 WA * 2 RE * 10 | 
ソースコード
#include <stdio.h>
int main(void){
    char s[1000];
    scanf("%s",s);
    long long int ans = 1;
    for(int i=0;s[i]!='\n';i++){
        if(s[i]=='L'){ans = ans*2;}
        else if(s[i]=='R'){ans = ans*2+1;}
        else if(ans==1){printf("1\n");return 0;}
    }
    printf("%lld\n",ans);
    
}
            
            
            
        
            
asdfghjkl;