Ad
  • Custom User Avatar

    thanks for the explanation, have a good day :)

  • Custom User Avatar

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

  • Custom User Avatar

    my problem here is if s = 0 and when you do s = s * 2 it should alwayse = 0? but what seems here that this is not the case?
    and shouldn't you start from the right to left? because you're doing it from the left to right?
    I think I'm missing something here, but you can view my solution to get a better idea of what I mean...

  • Custom User Avatar

    Ah, but it is! Can you elaborate on what doesn't look right about it? Maybe it looks "backwards"? I actually had to check it after your comment to make sure it worked correctly, but it does. I wrote a comment in response to @Lavios below to offer a theoretical justification for why it works. Maybe that will help, but if it doesn't, I'd be happy to answer any questions you have.

  • Custom User Avatar

    this doesn't look right?