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

1316,怎么overflow了?

Posted by Isaacpei at 2011-10-23 15:13:05
#include <stdio.h>
main()
{
    int a,b,c,d,i;
    int A[10000]={0};
    for(a=0;a<=9;a++)
      for(b=0;b<=9;b++)
          for(c=0;c<=9;c++)
              for(d=0;d<=9;d++)
              {
                    i=1001*a+101*b+11*c+2*d;
                    A[i]=A[i]+1;
              }
    for(i=1;i<=9999;++i)
    {
        if(A[i]==0)
        printf("%d\n",i);
    }
}

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