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

这题有什么玄机么???

Posted by 201165148 at 2012-07-13 11:10:31 on Problem 1316
我直接就过了啊……0MS
#include <stdio.h>

bool flag[10000]={0};
int g;
int i;

int main()
{
    for(i=1;i<10000;i++)
    {
        g=i+i/1000+(i/100)%10+(i/10)%10+i%10;
        flag[g]=1;
    }
    for(i=1;i<10000;i++)
    {
        if(flag[i]==0)
            printf("%d\n",i);
    }
    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