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.
A clever way of using streams for this kata even if it is not the best sollution from several points of view (readability, memory usage, number of iterations)
Oh, my bad. It's Java and 46340 < sqrt(Integer.MAX VALUE) < 46341
Please clarify in the instructions the maximum value of n we should expect. Anything greater than 46340 will have a square that doesn't fit into int and needs some care to be counted correctly. Even greater numbers will pose even more challenges.
Ex:
For n=46341, d=1 the expected count is 57995 (not 57993)