k = 0 for i in range(20): for j in range(30): if (5 * i + 3 * j + (100 - i - j) / 3) == 100: k = 100 - i - j print(i, j, k)
模拟