题目:
代码:
for a in range(1,200):
for b in range(1,51):
for c in range(1,401):
if (3*a+7*b+c == 315 and 4*a+10*b+c ==420):
print(a+b+c)
A+3*B = 105
3*(A+3*B) + A + B +C = 420
结果:105
题目:
代码:
for a in range(1,200):
for b in range(1,51):
for c in range(1,401):
if (3*a+7*b+c == 315 and 4*a+10*b+c ==420):
print(a+b+c)
A+3*B = 105
3*(A+3*B) + A + B +C = 420
结果:105