x+y+z+u=xyzu,有幾組正整數解?

2015-10-23 2:16 pm

回答 (1)

2015-10-26 7:43 am
✔ 最佳答案
利用 Excel VBA , 程式碼如下:
----------------------------------------------
Sub my_combination()

M = 100
r = 1

For x = 1 To M
For y = 1 To M
For z = 1 To M
For u = 1 To M
If x + y + z + u = x * y * z * u Then
Cells(r, 1) = x & " " & y & " " & z & " " & u
r = r + 1
End If
Next
Next
Next
Next

End Sub
----------------------------------------------
執行結果皆為 1 , 1 , 2 , 4 之排列組合
4! / 2! = 24 / 2 = 12

Ans: 12 組正整數解


收錄日期: 2021-05-02 14:09:41
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20151023061643AARjkwB

檢視 Wayback Machine 備份