记录详情

Compile Error

foo.c: In function 'main':
foo.c:14:18: warning: passing argument 2 of 'fgets' makes integer from pointer without a cast [-Wint-conversion]
   14 |     fgets("%d%d",&n,&k);
      |                  ^~
      |                  |
      |                  int *
In file included from foo.c:1:
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:592:47: note: expected 'int' but argument is of type 'int *'
  592 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |                                           ~~~~^~~
foo.c:14:21: warning: passing argument 3 of 'fgets' from incompatible pointer type [-Wincompatible-pointer-types]
   14 |     fgets("%d%d",&n,&k);
      |                     ^~
      |                     |
      |                     int *
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:592:69: note: expected 'FILE * restrict' but argument is of type 'int *'
  592 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |                                                    ~~~~~~~~~~~~~~~~~^~~~~~~~
foo.c:18:20: warning: passing argument 2 of 'fgets' makes integer from pointer without a cast [-Wint-conversion]
   18 |         fgets("%d",&a[j]);
      |                    ^~~~~
      |                    |
      |                    int *
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:592:47: note: expected 'int' but argument is of type 'int *'
  592 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |                                           ~~~~^~~
foo.c:18:9: error: too few arguments to function 'fgets'
   18 |         fgets("%d",&a[j]);
      |         ^~~~~
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:592:14: note: declared here
  592 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |              ^~~~~
foo.c:26:9: error: too many arguments to function 'puts'
   26 |         puts("%d ",m);
      |         ^~~~
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:661:12: note: declared here
  661 | extern int puts (const char *__s);
      |            ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
5-2 模运算的逆元
语言
C
递交时间
2023-10-01 19:39:52
评测时间
2023-10-01 19:39:52
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes