Ad
  • Custom User Avatar

    "Don't worry about fractions of second during calculations" durr my bad

  • Custom User Avatar

    having similar troubles

  • Default User Avatar

    The description is right, no need to do nosense rounding!

  • Default User Avatar

    Very nice kata, but I felt the same about the optimisation - I've completed it in Python as well btw. The description should make the optimisation demands clear, otherwise I've spent hours with my fully working (logic wise) code that would not be accepted by the server. Ended up mindlesly copying prime algorithms from different sites just to see if they improve the speed.
    Kata solved now, but all the good feeling about getting the logic is lost after all the obscure and undefined loops on making it pass the server 12sec limit. Nothing wrong with optimisation katas, but please, make it clear in the description. Had to rate it a "sad face" purely because of that, very nice kata otherwise.
    Maybe author could relax some of his tests, as big numbers do little to test the logic anyway.

  • Default 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

  • Default User Avatar

    Did you read some other Python solutions? It is easy when you have succeeded.

  • Default User Avatar

    Passed in Python 2.7, but ONLY after doing a lot of adhoc nonsense changes to dance around incosistent rounding rules.

    eg:

    if abs( round(seconds_exact,0) - round(seconds_exact,9) ) <0.001:
    seconds = round(seconds_exact,0)
    else:
    seconds = int( seconds_exact )

    The description says "...don't worry for fractions of second..." - haha, it was the biggest worry by a mile. Needs specifics on how rounding off is to be done.