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

Re:为什么wa?有什么特殊数据么?

Posted by SaiRose at 2006-08-27 10:08:15 on Problem 2100
In Reply To:为什么wa?有什么特殊数据么? Posted by:SaiRose at 2006-08-27 10:04:14
我的方法就是解方程
x^2+(x+1)^2+...+(x+t-1)^2=n
枚举所有满足1^2 + 2^2 +...+t^2 <= n 的t
如果上述方程有解则是结果
    -t*(t-1) + sqrt( 4*n*t-t*t*(t*t-1)/3 )
x=------------------------------
              2 * t
漏了什么情况么?

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