Ad
  • Default User Avatar

    Hello,

    I try to solve this with Kotlin.
    But I got the feeling that the error message seems to bo wrong in the test cases.
    Here is an example:

    Input: 'run{->a}' expected:<[]> but was:<[Hugh?]>

    When I got the description correct the input is invalid so the answer should be Hugh? but the test case expects the empty string as answer.

    Is the test broken ? (Are some test broken ?)

    regards
    Kai

  • Custom User Avatar

    There are no months in the kata's description.

  • Default User Avatar

    my output to 132030240 is "4 years, 2 months, 8 days, 3 hours, 4 minutes"

  • Default User Avatar

    Hello,

    I use kotlin and I got trouble with some random tests:
    for the input 9376316:
    TimeFormatter.formatDuration(9376316)
    my solution gives the output:
    3 months, 18 days, 12 hours, 31 minutes and 56 seconds
    but the test expects:
    expected:<[10]8 days, 12 hours, 31...> but was:<[3 months, 1]8 days, 12 hours, 31...>
    The 108 days however violate the rule that the biggest units possible should be used.
    Did I got something wrong ? or are the tests broken ?

    best regards
    Kai

  • Default User Avatar

    I well understand that but the question is why my program is good for all the tests but one
    It's very curious
    I am not the first who find that

  • Default User Avatar

    Print your output and maybe you will understand better.
    [320, 441] should equal [1050, 1925] means you returned [320, 441] instead of [1050, 1925].

  • Default User Avatar

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

  • Default User Avatar

    thx
    that was the problem

  • Custom User Avatar

    Which one of those is n? m should be greater than n. 199760 is out of bounds, so it can't be n, and it's less than 309135 so it can't be m either.

  • Default User Avatar

    Hello,

    I use Kotlin.
    The test for
    "Start: 304765, Limit: 309564, Expected: Nothing"
    seems to be broken. My code finds a solution:
    (309135 199760)

    since the divisors of 309135 are:
    1, 3, 5, 15, 37, 111, 185, 555, 557, 1671, 2785, 8355, 20609, 61827, 103045 which sums up to 199761

    and the divisors of 199760 are:
    1, 2, 4, 5, 8, 10, 11, 16, 20, 22, 40, 44, 55, 80, 88, 110, 176, 220, 227, 440, 454, 880, 908, 1135, 1816, 2270, 2497, 3632, 4540, 4994, 9080, 9988, 12485, 18160, 19976, 24970, 39952, 49940, 99880 which sums up to 309136

    the solution should be correct.
    could you fix this test ? Or do I get something wrong ?

    best regards

    Kai