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 zyx980506 at 2010-04-17 16:58:02 on Problem 1844
In Reply To:短代码 Posted by:failed at 2009-07-15 10:56:37
感激大牛!!
var i,j,k,x,y,z,s:longint;
begin
  readln(s);
  i:=1;
  while(i*(i+1)div 2<s)or(odd(i*(i+1)div 2-s))do inc(i);
  writeln(i);
end.

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