Ad
  • Custom User Avatar

    Yeah, that's the point. We want to get the right answer as we make in general mathematic, regardless of the Python specification.

  • Custom User Avatar

    When I tried my solution, system told me that "Process was terminated. It took longer than 6000ms to complete
    ". I doubt that my solution is inefficient.
    Then I copy your code, run again, then I got the the time-out question again; I can't submit it.
    Are there some questions with the Computer or speed of the Internet?
    So strange.

  • Custom User Avatar

    if 'i' is a string, also doesn't exist in the 'string',
    what result would return?

  • Custom User Avatar

    I think,
    insertting commas every 3 numbers is a method, but not a good one.
    format(price, ',d'), or something like that is clever but not a suitable one.
    It is the feature of finance respect of every 3 numbers a comma.
    format(price, ',d') solves it by chance.

    In my opinion, I used the recursion method. If you like it, you can check my code.
    Enjoy...