推導出公式

L(2a + L - 1)/2 = N

=>L(2a + L - 1) = 2N

故對2N相除

然後最後a可以為正整數者則通過(注意a為0的情況 則是2 * N為完全平方數)

 

http://nopaste.csie.org/fe1e2

文章標籤
全站熱搜
創作者介紹
創作者 robertanders 的頭像
robertanders

Robert Anderson's Blog

robertanders 發表在 痞客邦 留言(0) 人氣(0)