Ad
  • Custom User Avatar

    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)

  • Custom User Avatar

    Oh, my bad. It's Java and 46340 < sqrt(Integer.MAX VALUE) < 46341

  • Custom User Avatar

    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)