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:zsl2007 at 2005-12-31 13:47:35 #include <stdio.h> int main () { int i , s , sum ; scanf ( "%d" , &s ) ; for ( sum = 1 , i = 1 ; sum < s || sum > s && ( sum - s ) % 2 ; i ++ , sum += i ) ; printf ( "%d\n" , i ) ; return 0 ; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator