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:更正In Reply To:算法:数学方法 Posted by:milksea at 2007-01-31 04:38:32 > 解不等式 > (for k = 1 to i)∑k = i * (i + 1) / 2 ≤ n, > 注意到i是满足上式的最小正整数,得到 > i = (√(8 * n + 1) - 1) / 2(取整数) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 于是有: > 金币数 > = (for k = 1 to i)∑k^2 + (n - i) * (i + 1) > = (i + 1) * (6 * n - 2 * i - i^2) / 6 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator