結果

問題 No.304 鍵(1)
ユーザー 成りすましはダメよ成りすましはダメよ
提出日時 2015-12-05 09:14:38
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 164 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 23,428 KB
実行使用メモリ 24,504 KB
平均クエリ数 1.00
最終ジャッジ日時 2023-09-23 08:14:05
合計ジャッジ時間 2,016 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,120 KB
testcase_01 WA -
testcase_02 RE -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:7: warning: passing argument 1 of ‘fgets’ from incompatible pointer type [-Wincompatible-pointer-types]
 fgets(stdin,s,257);
       ^~~~~
In file included from main.c:1:
/usr/include/stdio.h:570:14: note: expected ‘char * restrict’ but argument is of type ‘FILE *’ {aka ‘struct _IO_FILE *’}
 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
              ^~~~~
main.c:9:13: warning: passing argument 2 of ‘fgets’ makes integer from pointer without a cast [-Wint-conversion]
 fgets(stdin,s,257);
             ^
In file included from main.c:1:
/usr/include/stdio.h:570:14: note: expected ‘int’ but argument is of type ‘char *’
 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
              ^~~~~
main.c:9:15: warning: passing argument 3 of ‘fgets’ makes pointer from integer without a cast [-Wint-conversion]
 fgets(stdin,s,257);
               ^~~
In file included from main.c:1:
/usr/include/stdio.h:570:14: note: expected ‘FILE * restrict’ {aka ‘struct _IO_FILE * restrict’} but argument is of type ‘int’
 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
              ^~~~~

ソースコード

diff #

#include <stdio.h>

int main(void) {
char s[257];
int i = 0;
start:
printf("%03d\n",i++);
fflush(stdin);
fgets(stdin,s,257);
if (s[0]=='l') goto start;


return 0;}
0