k = 5 n = 300 time = 0 made = 0 sold = 0 while time <= n: time += 1 if time % k == 0: made += 1 if time % 3 == 0: if made > sold: sold += 1 print(sold)
To embed this project on your website, copy the following code and paste it into your website's HTML: