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 |
Re:狂晕^^^^^偶的哪错了,高手们指点下…………呜呜………………In Reply To:狂晕^^^^^偶的哪错了,高手们指点下…………呜呜……………… Posted by:ecjtu_wangkun at 2007-12-08 13:02:36 > > > #include<iostream> > using namespace std; > int main() > { > int i,m,s; > while(cin>>m) > { > s=0; > for(i=1;s<m;i++) > s+=i; > if((s-m)%2==0) > cout<<(i-1)<<endl; > else > cout<<(i+1)<<endl; > > } > return 0; > } > > > > > Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator