Search found 1 match

by shaiful
Tue Aug 07, 2007 5:59 am
Forum: Volume 102 (10200-10299)
Topic: 10200 - Prime Time
Replies: 202
Views: 97010

I got 20 WA in this problem
Can any one help me on my code?


#include<stdio.h>
#include<math.h>


bool prime(long long n)
{
long long i,sq;
sq=(long long)sqrt((double)n);

for(i=2;i<=sq;i++)
{
if(n%i==0) return false;
}
return true;
}

int main()
{

long long dif,count,temp,t,i,j,n1,n2,k ...

Go to advanced search