Ad
  • Default User Avatar

    I just wanna say this is a beautiful and clever implementation , 100x faster than mine lol.
    I love it how you came up with the range for the 2nd for loop to be up to i**0.5 this is so efficient.
    So, if i is 1024, you only loop from 1 to 32 and then you get the other numbers by dividing 1024 by (1,32).
    In my case I would go all the way to 1024 in the loop, lol.
    When i tested my solution for (1,30 000 ) it takes 44s, lol, where as yours takes 0.4s :D

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution