Runtime Error

foo.cc: In function ‘void GetPrimes(int, int)’:
foo.cc:12:30: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   12 |                 for(int j=0;j<Primes.size()&&i*Primes[j]<=n;j++)
      |                             ~^~~~~~~~~~~~~~
foo.cc: In function ‘int main()’:
foo.cc:25:21: warning: unused variable ‘ans’ [-Wunused-variable]
   25 |                 int ans=0;
      |                     ^~~
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 2ms 504.0 KiB
#2 Runtime Error Segmentation fault 2ms 504.0 KiB
#3 Runtime Error Segmentation fault 3ms 760.0 KiB
#4 Runtime Error Segmentation fault 2ms 504.0 KiB
#5 Runtime Error Segmentation fault 2ms 760.0 KiB
#6 Runtime Error Segmentation fault 2ms 504.0 KiB
#7 Runtime Error Segmentation fault 2ms 760.0 KiB
#8 Runtime Error Segmentation fault 2ms 760.0 KiB
#9 Wrong Answer On line 1: Read 0, expect 9. 2ms 508.0 KiB
#10 Wrong Answer On line 1: Read 0, expect 19. 3ms 508.0 KiB

信息

递交者
类型
递交
题目
P1007 统计质数
语言
C++
递交时间
2025-07-17 21:38:40
评测时间
2025-07-17 21:38:40
评测机
分数
0
总耗时
28ms
峰值内存
760.0 KiB