运行 ID 作者 题号 测评结果 分数 时间 内存 语言 代码长度 提交时间
628558 cgr202440025189 1078 - 素数判定 编译错误 0 0 MS 0 KB C 469 3个月前
暂时无法获取本题测试点详情。

Main.c:3:1: error: unknown type name 'bool'
3 | bool is_prime(int n) {
| ^~~~
Main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
1 | #include <stdio.h>
+++ |+#include <stdbool.h>
2 |
Main.c: In function 'is_prime':
Main.c:4:24: error: 'false' undeclared (first use in this function)
4 | if (n <= 1) return false;
| ^~~~~
Main.c:4:24: note: 'false' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
Main.c:4:24: note: each undeclared identifier is reported only once for each function it appears in
Main.c:5:24: error: 'true' undeclared (first use in this function)
5 | if (n <= 3) return true;
| ^~~~
Main.c:5:24: note: 'true' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
Main.c:11:1: warning: control reaches end of non-void function [-Wreturn-type]
11 | }
| ^