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:WuChengWei at 2008-05-01 15:48:25 谢谢了! > sum = a1+a2+...+an > sum = an+...+a2+a1 > > 2sum = n(a1+an) > 又an = a1+ (n-1) > > 2sum = n(2a1+n-1) > > eg1: > sum=15; > 2sum = 30 = n(2a1+n-1) > > 把30 分解成 a*b的形式: > > 2sum = n * (2*a1+n-1) > 30 = 1 * 30 ==> 30 = 2*a1+1-1 ==> a1=15 (n=1) > = 2 * 15 ==> 15 = 2*a1+2-1 ==> a1=7 (n=2) > = 3 * 10 ==> 10 = 2*a1+3-1 ==> a1=4 (n=3) > = 5 * 6 ==> 6 = 2*a1+5-1 ==> a1=1 (n=5) > > eg2: > sum = 10, > 2sum = 20 = n(2a1+n-1) > > 把20 分解成 a*b的形式: > > 2sum = n * (2*a1+n-1) > 20 = 1 * 20 ==> 20 = 2*a1+1-1 ==> a1=10 (n=1) > = 2 * 10 ==> 10 = 2*a1+2-1 ==> 2*a1 = 9, 不存在 > = 4 * 5 ==> 5 = 2*a1+4-1 ==> a1=1 (n=4) > > > Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator