| ||||||||||
| 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:Re:简单解法:) Posted by:IC0500510080 at 2005-12-25 17:25:15 #include<stdio.h>
int main()
{
long s,i,m=0;
scanf("%ld",&s);
for(i=1;m<s||(m-s)%2;i++)m+=i;
printf("%ld",i-1);
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator