結果
| 問題 | 
                            No.304 鍵(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             成りすましはダメよ
                         | 
                    
| 提出日時 | 2015-12-05 09:14:38 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 164 bytes | 
| コンパイル時間 | 291 ms | 
| コンパイル使用メモリ | 20,736 KB | 
| 実行使用メモリ | 25,476 KB | 
| 平均クエリ数 | 1.00 | 
| 最終ジャッジ日時 | 2024-07-16 08:03:10 | 
| 合計ジャッジ時間 | 2,069 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 1 RE * 5 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:7: warning: passing argument 1 of ‘fgets’ from incompatible pointer type [-Wincompatible-pointer-types]
    9 | fgets(stdin,s,257);
      |       ^~~~~
      |       |
      |       FILE *
In file included from /usr/include/stdio.h:894,
                 from main.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:262:25: note: expected ‘char * restrict’ but argument is of type ‘FILE *’
  262 | 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]
    9 | fgets(stdin,s,257);
      |             ^
      |             |
      |             char *
In file included from /usr/include/stdio.h:894,
                 from main.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:262:34: note: expected ‘int’ but argument is of type ‘char *’
  262 | 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]
    9 | fgets(stdin,s,257);
      |               ^~~
      |               |
      |               int
In file included from /usr/include/stdio.h:894,
                 from main.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:262:56: note: expected ‘FILE * restrict’ but argument is of type ‘int’
  262 | fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |                                       ~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:9:1: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 | fgets(stdin,s,257);
      | ^~~~~~~~~~~~~~~~~~
            
            ソースコード
#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;}
            
            
            
        
            
成りすましはダメよ