Problem mathtest
User Josh28
Submission Time 2022-12-28 19:57:46
Score 0
Max Time N/A
Max Memory N/A

Compile Error

mathtest.cpp: In function ‘void SieveOfEratosthenes(std::vector<long long int>&)’:
mathtest.cpp:49:21: error: conversion from ‘double’ to ‘long unsigned int’ in a converted constant expression
49 | #define MAX_SIZE 2e6+1
| ~~~^~
mathtest.cpp:56:18: note: in expansion of macro ‘MAX_SIZE’
56 | bool IsPrime[MAX_SIZE];
| ^~~~~~~~
mathtest.cpp:49:21: error: could not convert ‘(2.0e+6 + (double)1)’ from ‘double’ to ‘long unsigned int’
49 | #define MAX_SIZE 2e6+1
| ~~~^~
mathtest.cpp:56:18: note: in expansion of macro ‘MAX_SIZE’
56 | bool IsPrime[MAX_SIZE];
| ^~~~~~~~
mathtest.cpp:49:21: error: size of array ‘IsPrime’ has non-integral type ‘double’
49 | #define MAX_SIZE 2e6+1
| ~~~^~
mathtest.cpp:56:18: note: in expansion of macro ‘MAX_SIZE’
56 | bool IsPrime[MAX_SIZE];
|