Ad
  • Custom User Avatar

    duplicate issue above

  • Default User Avatar

    You don't need to loop through all the seconds of elapsed time. That's too time consuming.

    Instead, start with a description of the distance at which the faster tortoise will catch up to the slower one. For the first (slower) tortoise, this distance will be expressed as (v1 * time) + g. For the second (faster) tortoise, this distance will be expressed as (v2 * time). So start with the equation (v1 * time) + g = (v2 * time). Simplify that expression using normal math rules to isolate the time on one side of the equation.

    This will yield a time in hours, which you must still reformat as hours, minutes, seconds.

    I hope this helps without giving you too much.

  • Default User Avatar

    Which language please (Javascript)? It not a problem of the kata (712 guys passed it and more than 100 in JS), it can be a CW problem and then report it as a bug or it is a problem of your code. The "Submit" tests are much much more numerous.