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 843895379 at 2009-04-16 12:46:31 on Problem 2140
#include"stdio.h"
#include"stdlib.h"
int main(void)
{
    int i,n,j=0;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
                     if((2*n)%i==0&&((2*n)/i+1-i)%2==0)
                     {
                               j++;
                               if(((2*n)/i+1-i)/2<i)
                                {
                                      break;
                                }
                         
                     }
                                           
    }
    printf("%d\n",j);
    system("PAUSE");
    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