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 qsr10250030 at 2006-07-24 11:38:52
#include<stdio.h>
int main()
{ int i,j,k,a[101],b[101],n,g;
 scanf("%d",&n);
 for(i=0;i<n;i++)
 {scanf("%d",&a[i]);
 int t=0,p=-1,m=0;
    for (j=1;j<=a[i];j++)
     {for(k=1;k<=a[i];k++)
      if(j%k==0){p=-p;t=t+p;}
    if(t=1) m++;}
      b[i]=m;}
    for(i=0;i<n;i++)
    printf("%d\n",b[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