老人分马 广东 贾玉宝 1994-01-28 因为1/a+1/b+1/c=n/(n+1)<1所以a>=2,b>=3,c>=7,则n/(n+1)=1/a+1/b+1/c<=1/2+1/3+1/7=41/42,即n/(n+1)<=41/42,解得n<=41.如此有如下程序: 5 REM '分马' 10 PRINT "N", "X", "Y", "Z" 20 FOR N = 6 TO 41 30 FOR X = 3 TO (N + 1) / 2 40 FOR Y = 2 TO X - 1 50 Z = N - X - Y: IF Z >= Y THEN 100 60 IF INT((N + 1) / X) <> (N + 1) / X THEN 100 70 IF INT((N + 1) / Y) <> (N + 1) / Y THEN 100 80 IF INT((N + 1) / Z) <> (N + 1) / Z THEN 100 90 PRINT N, X, Y, Z 100 NEXT Y, X, N 110 END PRINT 以上程序用Basic语言编写,在PC-286(无硬盘)机上,调试通过。