problem 5, naive approach. didn't pass the 3 second rule.
used the sexy functional library

LCM was the way to solve this up front. I'm dumb.