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 WuChengWei at 2008-05-01 15:48:25 on Problem 2140
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:
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