Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
哪位大牛,,,帮忙看看哪错了哦!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator