/ Vijos /

记录详情

Wrong Answer

/in/foo.c: In function 'main':
/in/foo.c:6:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long int *' [-Wformat=]
    6 |         scanf("%d",&n);
      |                ~^  ~~
      |                 |  |
      |                 |  long int *
      |                 int *
      |                %ld
/in/foo.c:7:36: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[100]' [-Wformat=]
    7 |         for (i=1;i<=n;i++) scanf("%s%d%d%c%c%c%c%d",&name[i],&grade[i],&app[i],&leader[i],&leader[i],&west[i],&west[i],&paper[i]);
      |                                   ~^                ~~~~~~~~
      |                                    |                |
      |                                    char *           char (*)[100]
/in/foo.c:7:38: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'long int *' [-Wformat=]
    7 |         for (i=1;i<=n;i++) scanf("%s%d%d%c%c%c%c%d",&name[i],&grade[i],&app[i],&leader[i],&leader[i],&west[i],&west[i],&paper[i]);
      |                                     ~^                       ~~~~~~~~~
      |                                      |                       |
      |                                      int *                   long int *
      |                                     %ld
/in/foo.c:7:40: warning: format '%d' expects argument of type 'int *', but argument 4 has type 'long int *' [-Wformat=]
    7 |         for (i=1;i<=n;i++) scanf("%s%d%d%c%c%c%c%d",&name[i],&grade[i],&app[i],&leader[i],&leader[i],&west[i],&west[i],&paper[i]);
      |                                       ~^                               ~~~~~~~
      |                                        |                               |
      |                                        int *                           long int *
      |                                       %ld
/in/foo.c:7:50: warning: format '%d' expects argument of type 'int *', but argument 9 has type 'long int *' [-Wformat=]
    7 |         for (i=1;i<=n;i++) scanf("%s%d%d%c%c%c%c%d",&name[i],&grade[i],&app[i],&leader[i],&leader[i],&west[i],&west[i],&paper[i]);
      |                                                 ~^                                                                     ~~~~~~~~~
      |                                                  |                                                                     |
      |                                                  int *                                                                 long int *
      |                                                 %ld
/in/foo.c:25:22: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
   25 |         printf("%s\n%d\n%d",name[stu],max,sum);
      |                     ~^                ~~~
      |                      |                |
      |                      int              long int
      |                     %ld
/in/foo.c:25:26: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=]
   25 |         printf("%s\n%d\n%d",name[stu],max,sum);
      |                         ~^                ~~~
      |                          |                |
      |                          int              long int
      |                         %ld
/in/foo.c:4:16: warning: unused variable 'j' [-Wunused-variable]
    4 |         long i,j,n,grade[10000],app[10000],paper[10000],money[10000],sum,max,stu;
      |                ^
/in/foo.c:4:78: warning: 'stu' may be used uninitialized [-Wmaybe-uninitialized]
    4 |         long i,j,n,grade[10000],app[10000],paper[10000],money[10000],sum,max,stu;
      |                                                                              ^~~
# 状态 耗时 内存占用
#1 Accepted 1ms 404.0 KiB
#2 Wrong Answer 1ms 284.0 KiB
#3 Wrong Answer 1ms 320.0 KiB
#4 Wrong Answer 1ms 324.0 KiB
#5 Accepted 1ms 284.0 KiB
#6 Wrong Answer 1ms 324.0 KiB
#7 Wrong Answer 1ms 320.0 KiB
#8 Accepted 1ms 324.0 KiB
#9 Wrong Answer 1ms 284.0 KiB
#10 Wrong Answer 1ms 324.0 KiB

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C
递交时间
2025-02-19 16:38:53
评测时间
2025-02-19 16:38:53
评测机
分数
30
总耗时
13ms
峰值内存
404.0 KiB