Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Well four years later and there are still people (like me) running into this problem. There's even a test case testing for n=250k...
But I think that's a good thing, as I've learned something from that.
I had to look up other people's solutions. As it turns out the only difference to my solution was a cast to double. Without the cast I had a ratio [1] resulting from the division of two integers. And it seems like summing up a bunch of ratios is very inefficient.
[1] https://clojure.org/reference/data_structures#_ratio