Ad
  • Custom User Avatar

    I think all the types of sausages should be displayed in the problem statement.
    In my case, I only found all the types of sausages from the automated tests, after having written a solution for it.

    So, this:
    "Straight sausages I, curvy sausages ), even twirly sausages @ and many more."
    Should say:
    "Sausages may be represented as such: "@" , "I" , ")" , "║" , "l" , "1" , "(" , "|" , "¦" . "

    Cheers,
    Razvan Boboc

  • Custom User Avatar

    I think the formula in the description is flawed: (n k) = n!/(n-k)!
    According to this wiki page, the formula is: (n k) = n!/k!(n-k)!
    https://en.wikipedia.org/wiki/Binomial_coefficient

    I tried the formula from the description and the generated elements are not correct.
    As for the second one, it is fine.

  • Custom User Avatar

    Thanks, I eventually forfeited unfortunately.

    I just didnt seem to find any solution to those high numbers.
    At first I tried simplifying the fractions, but that however still did not work.
    What I got was time overflow.

  • Custom User Avatar

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

  • Custom User Avatar

    Not good very bad words !!

  • Custom User Avatar

    @Chrono79, B1ts

    I solved it, thanks a lot!!!

  • Custom User Avatar

    What I have is something rather conspicous

    All the tests pass so I dont have a reference

    Here's a screenshot after I click attempt : http://prntscr.com/uu5d2v

  • Custom User Avatar

    TypeError: Cannot read property 'toUpperCase' of undefined

    Only one test fails after I click attempt.

    Do you guys know what it is? How can a value be undefined, when I am clearly passing a string to the function.

  • Custom User Avatar

    Can someone explain map((x, y, a) => x + '0'.repeat(a.length - y - 1))?

    I know it adds zeroes to the digits from the int part but I can't understand why we pass (x, y, a) => x + '0'.repeat(a.length - y - 1) to the map method

    Sorry if it is a stupid question, thanks