結果
| 問題 | 
                            No.104 国道
                             | 
                    
| コンテスト | |
| ユーザー | 
                             zect518
                         | 
                    
| 提出日時 | 2018-05-27 13:44:00 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 196 bytes | 
| コンパイル時間 | 118 ms | 
| コンパイル使用メモリ | 28,672 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-06-28 18:26:49 | 
| 合計ジャッジ時間 | 742 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 3 | 
| other | WA * 16 | 
コンパイルメッセージ
main.c: In function 'main':
main.c:6:9: warning: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    6 |         gets(c);
      |         ^~~~
      |         fgets
/usr/bin/ld: /tmp/cchrGdje.o: in function `main':
main.c:(.text.startup+0xf): 警告: the `gets' function is dangerous and should not be used.
            
            ソースコード
#include<stdio.h>
int main(){
	int i,road=1;
	char c[30];
	gets(c);
	while(c[i]!='\0'){printf("*");
		if(c[i]=='L')road=road*2;
		else road=road*2+1;
		i++;
	}
	printf("%d",road);
}
            
            
            
        
            
zect518