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 Acm06001_200 at 2007-03-27 23:22:09 on Problem 1218
In Reply To:Re:为什么错呢? Posted by:38131 at 2004-12-09 19:35:14
> #include<stdio.h>
> #include<math.h>
> void main()
> {
> int i,j,n,t,k,o=0,s=0;
> scanf("%d\n",&k);
> for(i=1;i<=k;i++)
> {
>          scanf("%d\n",&n);
>          for(j=1;j<=n;j++)
>                  {
>                          o=0;
>                          for(t=1;t<=n;t++)
>                          {
>                                  s=0;
>                                  if(j%t==0)
>                                        s=s+1;
>                          if(s%2==1)
>                               o=o+1;
> 						 }
>                  }
>          printf("%d\n",o);
>                  
> }
> }

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