Ad
  • Default User Avatar

    i also dont understand. 16 + 6 = 22, not 19. I mean by 5:45 the number of chimes is 16. then at 6:00 it chimes 6 more times. dont we sum up 16 and 6?

  • Default User Avatar

    Just to spell this out in detail, "chimes out the hour" means that it chimes once at 1:00, twice at 2:00, 3 times at 3:00, and so on, up to 12 times at 12:00.

  • Default User Avatar

    Hi 1iekim,

    When I run your solution, (thanks to depial for pointing out that I could do this), it passes all the tests, including the random tests. So I'm assuming you figured it out.

  • Custom User Avatar

    FYI I created a small utility userscript which can show what language you need to switch to:

    Show attempted languages

    It's not ideal, but mostly works.

  • Default User Avatar

    @brodiemark I'm not sure if you're aware of this feature, but you can click the View Solution button under a user's message to see what code they last ran if you want to help debug. To actually see their code, I think you'll need two things:

    • To have completed the kata in the language the user is attempting
    • Have selected the language the user is attempting from the dropdown menu at the top of this page (as though you wanted to attempt that language)

    Since you've written all the translations (with the exception of Julia), you should be able to do this (1iekim is not using Julia). If you haven't selected the correct language in the dropdown menu, you'll see There is no solution to show.

    @1iekim This is why it's nice for users to specify what language they are attempting when asking for help, then those helping don't have to guess.

  • Custom User Avatar

    can anyone explain this,i look at it for about 5 mins and I still don't get it

    [Example: "03:38", 19 should return "06:00".
    Explanation: It chimes once at "03:45", 4 times at "04:00", once each at "04:15", "04:30", "04:45", 5 times at "05:00", and once each at "05:15", "05:30", "05:45". At this point it has chimed 16 times, so the 19th chime occurs when it chimes 6 times at "06:00".]

    so 03:38 = start
    03:45 chimes = 1
    04:00 chimes = 2
    04:15 chimes = 3
    04:30 chimes = 4
    04:45 chimes = 5
    05:00 chimes = 6
    05:15 chimes = 7
    05:30 chimes = 8
    05:45 chimes = 9
    06:00 chimes = 10

    where the number 19 come from?

  • Custom User Avatar

    Use spoiler flag next time please.

  • Custom User Avatar

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

  • Custom User Avatar

    it's work so you good mate

  • Custom User Avatar
  • Custom 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

  • Custom User Avatar

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

  • Custom User Avatar

    Because you didn't test your code there with the input value that makes your code fail here, read the error message:

    TypeError: Reduce of empty array with no initial value
    

    Your code fails this test:

    assert.strictEqual(solution(''), '');
    
  • Custom User Avatar

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

  • Loading more items...