結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
23,880 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8: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:8: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:8: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++);
fgets(stdin,s,257);
if (s[0]=='l') goto start;


return 0;}
0