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 yiyiyi4321 at 2006-07-31 16:51:04 on Problem 1844
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:
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