Ad
  • Custom User Avatar

    dude gotta say this sol 's fire! Made a version of it just after seeing it, good job!

  • Custom User Avatar

    Agreed, more of a Math problem than a programming problem. The implementation is so easy if you know the aliquot sum and its number theory.

  • Default User Avatar

    no evidence given, closing

  • Default User Avatar

    Range applies to the full time span indicated, so if the fastest time was 1:02:03 and the slowest time was 3:05:07 then the time range is 2:03:04.
    If the fastest time was 1:30:40 and the slowest time was 2:20:30 then the time range is 0:49:50.

    In real world terms the range question is asking "how long did the person at the finish line with the stopwatch have to wait, between the moment the fastest runner finished, and the moment the slowest runner finished? How much time passed between the winner finishing and the last person finishing?"

    You have to do time math on the entire period of time, not just the hours/minutes/seconds components separately

  • Default User Avatar

    fixed. your solution fails both the random and fixed tests consistently now

  • Custom User Avatar

    It seems to me that 6 kata is a good place for this task, there is nothing complicated here, and the solution lies on the surface

  • Custom User Avatar

    duplicate issue.

  • Default User Avatar

    The output of the function should be the number of people who could possibly be your friend.

    the kata is not asking you for an index, but for a count. you have to figure out how many reds could potentially be your friends, keeping in mind that your red friend has 2 blue friends ...

  • Custom User Avatar

    You've confused yourself a little with the description. "Digits" are the symbols used to represent a number, and "consecutive digits" are therefore digits which are next to each other when you write a number down without respect to their value.

    In the number 82735, 8 and 2 are "consecutive digits" as are 2 and 7, and so on, because they are next to each other.

    What you're thinking about in your first example are "consecutive numbers", numbers which follow each other by value rather than by position. Reread the description with this distinction in mind; it does not talk about "consecutive numbers" at all.

  • Custom User Avatar

    Very glad to hear. Thank you so much for this feedback. Have a good day theprotagonist!!!

  • Default User Avatar
  • Default User Avatar

    that's why we removed that test ._.

  • Default User Avatar

    Done, along with many other improvements in this fork. Please take a look if you have a moment, thank you.

  • Default User Avatar

    the test with NULL should rather be removed, it's not present in other languages as far as i can see

  • Default User Avatar

    I have added a thorough comment to the solution set-up.

  • Loading more items...