. , " , , " n "McNuggets"? ββ, - :
solution = (0,0,0)
for a in range(0,n):
for b in range(0,n):
for c in range(0,n):
if 6*a + 9*b + 20*c == n:
solution = (a,b,c)
, , , :
while consecutivecount < 6:
solution = (0,0,0)
if solution == (0,0,0):
consecutivecount = 0 #resets consecutivecount value to zero
savedn += [n] #adds current value of n to list
else:
consecutivecount += 1
n += 1 #increases value of n to continue test loop
, n, , consecutivecount, , ( reset consecutivecount). , n.