如果\(z\)是偶數
if \(z=0\),\(x+2y\leq 36\)共有\(19^2\)組解
if \(z=2\),\(x+2y\leq 30\)共有\(16^2\)組解
...
if \(z=12\),\(x+2y\leq 0\)共有\(1^2\)組解
\(1^2+4^2+\cdots +19^2=952\)
如果\(z\)是奇數
if \(z=1\),\(x+2y\leq 33\)共有\(17\times 18\)組解
if \(z=3\),\(x+2y\leq 27\)共有\(14\times 15\)組解
...
if \(z=11\),\(x+2y\leq 3\)共有\(2\times 3\)組解
\(2\times 3+\cdots +17\times 18=756\)