记录详情

Accepted

/in/foo.c:2:1: warning: data definition has no type or storage class
 PrimeCount(int a[], int n);
 ^~~~~~~~~~
/in/foo.c:2:1: warning: type defaults to 'int' in declaration of 'PrimeCount' [-Wimplicit-int]
/in/foo.c:16:1: warning: return type defaults to 'int' [-Wimplicit-int]
 PrimeCount(int a[], int n) {
 ^~~~~~~~~~
/in/foo.c: In function 'PrimeCount':
/in/foo.c:21:20: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   for (j = 2; j <= sqrt(a[i]); j++) {
                    ^~~~
/in/foo.c:21:20: warning: incompatible implicit declaration of built-in function 'sqrt'
/in/foo.c:21:20: note: include '<math.h>' or provide a declaration of 'sqrt'
/in/foo.c:25:11: warning: incompatible implicit declaration of built-in function 'sqrt'
   if (j > sqrt(a[i]))
           ^~~~
/in/foo.c:25:11: note: include '<math.h>' or provide a declaration of 'sqrt'
/in/foo.c:29:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
# 状态 耗时 内存占用
#1 Accepted 0ms 248.0 KiB
#2 Accepted 0ms 228.0 KiB
#3 Accepted 0ms 336.0 KiB
#4 Accepted 0ms 252.0 KiB
#5 Accepted 0ms 232.0 KiB

信息

递交者
类型
递交
题目
A9-1 数组中的素数个数
比赛
南师大2021程序设计基础课程第四次测验 (2021-12-23)
语言
C
递交时间
2021-12-23 14:13:07
评测时间
2021-12-23 14:13:07
评测机
分数
100
总耗时
4ms
峰值内存
336.0 KiB