| ||||||||||
| 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 | |||||||||
牛!In Reply To:我的一点见地. Posted by:lixiaoyi at 2008-11-14 21:04:43 > #include<iostream.h>
> int main()
> {
> int sum,n,x,count;
> cin>>x;
> sum=0;
> count=0;
> for(n=0;sum<=x;n++)
> {
> sum+=n;
> if((x-sum)%(n+1)==0&&(x-sum)/(n+1)!=0)
> {
> count++;
> }
> }
> cout<<count;
> }
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator