Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

可以解释一下吗?

Posted by chicanery at 2006-01-29 10:43:51 on Problem 1844
In Reply To:Re:我的 Posted by:rovingcloud at 2006-01-29 03:39:43
> #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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator