Search found 1 match

by fay007
Thu Mar 27, 2014 3:41 pm
Forum: Volume 5 (500-599)
Topic: 543 - Goldbach's Conjecture
Replies: 109
Views: 41552

543

getting TLE!! what is the wrong



#include<iostream>
#include<stdio.h>
#include<cmath>

using namespace std;

long int num1;
long int num2;
long int g=0;
bool prime_num[1100002];
long calculate_prime(long int p)
{


for(long int k=4;k<=p;k+=2)
{
prime_num[k]=true;
}
for(long int i=3;i<=(int ...

Go to advanced search