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

Re:请问判断它一个数的成立有什么好的方法吗???

Posted by zhaojianbo at 2009-02-15 11:24:51 on Problem 2956
In Reply To:请问判断它一个数的成立有什么好的方法吗??? Posted by:y05dzz at 2006-08-23 15:44:43
int repeat(long x)
{
	char vis[10];
	memset(vis,0,10);
	while (x>0)
	{
		if (vis[x % 10]) return 1;
        vis[x % 10] = 1;
		x= x / 10;
	}
	return 0;
}

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