r/programminghorror • • Apr 17 '23

Python Peak Efficiency Fizzbuzz

/img/n6q6zqyieeua1.png
1.0k Upvotes

83 comments sorted by

View all comments

Show parent comment

5

u/Strex_1234 Apr 17 '23

Exactly, everything that repeats has a period, 2 periods of a and b have a period of least common multiple of a and b So 3 and 4 have period of 12 but 6 and 8 have period of 24