Ad
  • Custom User Avatar

    elegant and simple to understand - nice one!

    I didn't know you could chain sub string slice with a reversal afterwards via seperate square brackets, I was getting caught up having it all in the same brackets, which was causing all kinds of fun :)

  • Custom User Avatar

    thankyou for the explanation on the maths side, I was totally lost and managed to get there with passing 1000+ but running into issues and then stumbled onto the right answer out of frustration rather than intuition.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    That is a cheat for the one edge case :)

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    I have it down to 2 failing now, so close.

  • Custom User Avatar

    OK looks like I can get past the repeating line error and now I can solve 116 with 91 failing and it seems to be there I have largeish numbers that don't quite get clos enough to eachother. Time for bed - ill keep trying tomorrow.

  • Default User Avatar

    Thanks that is helpful but it's almost midnight here and I'm running out of ideas.
    I think I need a way of being able to check if the line will repeat again (many times) because the value or either a or b is so large that it needs to be reduced significantly.

    I woudl think checking to see if the difference between the a and b is > 3 * a or 3 * b, then set a = 2 * b or b = 2 * a but that doesn't feel right.

  • Custom User Avatar

    I'm losing my mind on Python.

    I keep hitting the recursion limit which seems like a Python gap compared to other languages but then I assume I'm doing something stupid with my logic - however I see a lot of others having the same issue with the same test.

    solve(100000000000,3)

    Any suggestions for how to best approach solving this or if there's a specific feature / approach to trye would be appreciated.

    Should I be looking into generators and yields as an alternative?

    Amy suggestions / tips are appreciated.

  • Default User Avatar

    I love this solution, elegant yet simple enough to understand :)

    How would that look with f strings?

  • Default User Avatar

    I wondered if someone would take this approach, it definitely seems more clever and efficient from a general purpose perspective.

  • Custom User Avatar

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