记录详情

Accepted

foo.c: In function 'main':
foo.c:22:9: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[15]' [-Wformat=]
 scanf("%s",&stu[i].name);
        ~^  ~~~~~~~~~~~~
foo.c:28:9: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[15]' [-Wformat=]
 scanf("%s",&ren);
        ~^  ~~~~
foo.c:42:1: warning: implicit declaration of function 'system' [-Wimplicit-function-declaration]
 system("pause");
 ^~~~~~
foo.c: In function 'cmp':
foo.c:17:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
foo.c: In function 'main':
foo.c:20:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
 scanf("%d",&n);
 ^~~~~~~~~~~~~~
foo.c:22:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
 scanf("%s",&stu[i].name);
 ^~~~~~~~~~~~~~~~~~~~~~~~
foo.c:28:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
 scanf("%s",&ren);
 ^~~~~~~~~~~~~~~~
foo.c:30:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
 scanf("%d%d",&stu[song].money,&stu[song].renshu);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:34:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
 scanf("%s",ren);
 ^~~~~~~~~~~~~~~
正在同步测试数据,请稍后
# 状态 耗时 内存占用
#1 Accepted 1ms 496.0 KiB
#2 Accepted 2ms 472.0 KiB
#3 Accepted 1ms 496.0 KiB
#4 Accepted 1ms 496.0 KiB
#5 Accepted 1ms 496.0 KiB
#6 Accepted 1ms 496.0 KiB
#7 Accepted 1ms 496.0 KiB
#8 Accepted 1ms 492.0 KiB
#9 Accepted 1ms 496.0 KiB
#10 Accepted 1ms 496.0 KiB

信息

递交者
类型
递交
题目
P1064 贪婪的送礼者
语言
C
递交时间
2020-12-01 13:56:34
评测时间
2020-12-01 13:56:34
评测机
分数
100
总耗时
19ms
峰值内存
496.0 KiB