by kevinsync 8 hours ago
I love this, it's a very clever and funny way to solve the problem. Makes me think about how there are infinite routes from A to B, some more scenic and whimsical than others.. as well as all the people I've met along the way who would be so pissed and pedantic about how this isn't a "real solution" LOL
The problem is that you have to define the problem enough to avoid the fact that it's trivial to output the string "1,2,Fizz,4,Buzz,......" and fulfill the assignment. You can, in fact, output "$1,$2,Fizz,$4,Buzz,..." where $ is any prefix itself divisible by 15 (there are other templates for the other situations but it clearly does repeat endlessly.)