Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

prime(n+i)算一次就可以啦

Posted by 20053565 at 2008-09-07 19:28:23 on Problem 1142
In Reply To:各位兄台,TLE的code,看看那能不能优化。 Posted by:RUNSLOWLY at 2008-09-07 14:51:30
if(prime(n+i)==-1)
{
	i++;
//	printf("*\n");
}
else
	if(prime(n+i)==f(n+i))
	{	
		printf("%I64d\n",n+i);
	    	break; 
	}
   	else
	{
		i++;
	//	printf("*\n");
	}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator