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:我也暴利0ms

Posted by 734685966392070374 at 2011-03-15 19:59:32 on Problem 1316
In Reply To:我也暴利0ms Posted by:lmm333 at 2010-08-07 19:55:20
> #include<cstdio>
> #include<cmath>
> int s;
> bool b[10010];
> int d(int n)
> {
> 	s=n;
> 	int alen=(int)log10((double)n)+1,j;//求长度
> 	for(j=0;j<alen;j++)//求每位数字 
> 		s+=int(n/pow(10,j))%10;
> 	return s;
> }
> int main()
> {
> 	int i,k,a;
> 	for(i=1;i<10000;i++)
> 	{
> 		b[d(i)]=true;
> 	}
> 	for(i=1;i<10000;i++)
> 		if(b[i]==0)printf("%d\n",i);
> 	//getchar();
> }

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