結果

問題 No.304 鍵(1)
コンテスト
ユーザー 成りすましはダメよ
提出日時 2015-12-05 09:13:13
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
RE  
実行時間 -
コード長 149 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 311 ms
コンパイル使用メモリ 28,584 KB
最終ジャッジ日時 2026-02-23 19:57:34
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 2 RE * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:7: warning: passing argument 1 of ‘fgets’ from incompatible pointer type [-Wincompatible-pointer-types]
    8 | fgets(stdin,s,257);
      |       ^~~~~
      |       |
      |       FILE *
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from main.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:305:8: note: expected ‘char * __restrict__’ but argument is of type ‘FILE *’
  305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:8:13: warning: passing argument 2 of ‘fgets’ makes integer from pointer without a cast [-Wint-conversion]
    8 | fgets(stdin,s,257);
      |             ^
      |             |
      |             char *
In file included from /usr/include/stdio.h:970:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:305:68: note: expected ‘int’ but argument is of type ‘char *’
  305 | fgets (__fortify_clang_overload_arg (char *, __restrict, __s), int __n,
      |                                                                ~~~~^~~
main.c:8:15: warning: passing argument 3 of ‘fgets’ makes pointer from integer without a cast [-Wint-conversion]
    8 | fgets(stdin,s,257);
      |               ^~~
      |               |
      |               int
/usr/include/x86_64-linux-gnu/bits/stdio2.h:306:25: note: expected ‘FILE * __restrict__’ but argument is of type ‘int’
  306 |        FILE *__restrict __stream)
      |        ~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:8:1: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 | fgets(stdin,s,257);
      | ^~~~~~~~~~~~~~~~~~

ソースコード

diff #
raw source code

#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