| ||||||||||
| 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<iostream>
using namespace std;
int main()
{
int sum=0,s,i=0;
cin>>s;
while(sum<s||(sum-s)%2==1)
sum+=++i;
cout<<i;
return 1;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator