i have a problem with compiler my code is working in repl.it cpp11 compiler but when i enterind it for sending the compiler of spoj says thay my answer is wrong here is my code
`#include
using namespace std;
int main() {
int count = 0;
int n = 0;
cin>>n;
int *numbers = new int [n];
int *temp = new int[n];
for(int k = 1;k<n+1;k++){
numbers[k] = k;
}
for(int j = 0;j<n+1;j++){
if(numbers[j]%2==0){
temp[j] = 1;
}
}
for(int j = 0;j<n+1;j++){
if(numbers[j]%3==0){
temp[j] = 2;
}
}
for(int j = 0;j<n+1;j++){
if(numbers[j]%4==0){
temp[j] = 3;
}
}
for(int j = 0;j<n+1;j++){
if(temp[j]==2){
count++;
}
}
cout<<count;
return 0;
}`