結果
| 問題 |
No.104 国道
|
| コンテスト | |
| ユーザー |
zect518
|
| 提出日時 | 2018-05-27 13:42:18 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 183 bytes |
| コンパイル時間 | 114 ms |
| コンパイル使用メモリ | 28,288 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 18:26:45 |
| 合計ジャッジ時間 | 837 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / 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/ccNm12F7.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