记录详情

Compile Error

foo.cc: In function 'bool prime(int)':
foo.cc:7:20: error: 'sqrt' was not declared in this scope
     for(int i=2;i<=sqrt(x);i++) if(x%i==0) return false;
                    ^~~~
foo.cc:7:20: note: suggested alternative: 'qsort'
     for(int i=2;i<=sqrt(x);i++) if(x%i==0) return false;
                    ^~~~
                    qsort
foo.cc: In function 'int main()':
foo.cc:20:20: error: 'sqrt' was not declared in this scope
     for(int i=2;i<=sqrt(n);i++) 
                    ^~~~
foo.cc:20:20: note: suggested alternative: 'qsort'
     for(int i=2;i<=sqrt(n);i++) 
                    ^~~~
                    qsort
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1245 A Almost Prime
语言
C++
递交时间
2021-07-17 16:31:59
评测时间
2021-07-17 16:31:59
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes