记录详情

Wrong Answer

foo.c: In function 'main':
foo.c:6:5: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |     scanf("%d",&a);
      |     ^~~~~
foo.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main()
foo.c:6:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |     scanf("%d",&a);
      |     ^~~~~
foo.c:6:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
foo.c:6:5: warning: writing into constant object (argument 2) [-Wformat=]
foo.c:11:25: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   11 |                         printf("%d+%d=%d\n",b,c,a);
      |                         ^~~~~~
foo.c:11:25: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:11:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
foo.c:11:25: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:7:14: warning: 'a' is used uninitialized [-Wuninitialized]
    7 |     for(b=1;b<a;b++){
      |             ~^~
foo.c:3:15: note: 'a' declared here
    3 |     const int a;
      |               ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer 1,2d0 < 1+9=10 < 2+8=10 4d1 < 1ms 200.0 KiB
#2 Wrong Answer 1,2d0 < 1+199=200 < 2+198=200 1ms 284.0 KiB
#3 Wrong Answer 1,6d0 < 1+299=300 < 2+298=300 1ms 200.0 KiB
#4 Wrong Answer 1,2d0 < 1+999=1000 < 2+998=100 3ms 284.0 KiB
#5 Wrong Answer 1,2d0 < 1+721=722 < 2+720=722 2ms 200.0 KiB

信息

递交者
类型
递交
题目
A3-4 素数专题:验证哥德巴赫猜想
比赛
2023年新生赛(第一场)
语言
C
递交时间
2023-08-15 17:08:19
评测时间
2023-08-15 17:08:19
评测机
分数
0
总耗时
11ms
峰值内存
284.0 KiB