| ||||||||||
| 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:为什么wa?有什么特殊数据么?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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator