Problem | primepie |
---|---|
User | YSH2020 |
Submission Time | 2025-02-06 18:40:56 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
primepie.cpp: In function ‘long long int amountEaten(int)’:
primepie.cpp:5:12: error: ‘cin’ was not declared in this scope
5 | int x; cin >> x;
| ^~~
primepie.cpp:2:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
1 | #include "primepie.h"
+++ |+#include <iostream>
2 | using namespace std;
primepie.cpp:7:5: error: ‘memset’ was not declared in this scope
7 | memset(sieve, 0, sizeof(sieve));
| ^~~~~~
primepie.cpp:2:1: note: ‘memset’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
1 | #include "primepie.h"
+++ |+#include <cstring>
2 | using namespace std;
primepie.cpp:17:5: error: ‘cout’ was not declared in this scope
17 | cout << ans;
| ^~~~
primepie.cpp:17:5: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘