Ad
  • Default User Avatar

    for me it fails in Java.
    if I change this: ->
    assertEquals("Halifax, Montreal, Toronto, Chicago, Winnipeg, Seattle",
    routes.findRoutes(new String[][]{{"Chicago", "Winnipeg"}, {"Halifax", "Montreal"}, {"Montreal", "Toronto"}, {"Toronto", "Chicago"}, {"Winnipeg", "Seattle"}}));

    to this: -> assertEquals(Chicago, Winnipeg, Seattle",
    routes.findRoutes(new String[][]{{"Chicago", "Winnipeg"}, {"Halifax", "Montreal"}, {"Montreal", "Toronto"}, {"Toronto", "Chicago"}, {"Winnipeg", "Seattle"}}));
    it works fine but still it is changed back when pressing submit.

  • Default User Avatar

    well what I understood is you want A to have most of gold in every possible situation. In your case it would A takes 569, B takes 809, A takes 389 and finally B takes 128 which results in [958, 937] so A has more gold than B condition is filled. I might be wrong so everyone can correct me.

    PS: Not in every case you have to take highest number from golds list by A programmer.

  • Default User Avatar

    Shouldnt Fibonacci sequence start with 0? Your test cases all starts with 1. Not big issue just asking.

  • Default User Avatar

    okey got it.

  • Default User Avatar

    hmm description has wrong inputs and even first test case is wrong 'name1' 150 ['B', 'A', 'A', 'C', 'A', 'A'] = 430(120) + 120(20) + 1*10(10) + additional 20 points = 170 not 150 so name1 should be returned as hacked.

  • Default User Avatar

    You state we need to round to 2 decimal yet in your test cases you sometimes have 1 decimal sometimes 2 and sometimes none. This was really painful.

  • Default User Avatar

    Okey I figured it out was definately my mistake. Thank you for help (didnt realize I didnt need whole bit sequence only 76 :D ) and sorry for marking it as issue I m still new to this site.

  • Default User Avatar

    ok I will try to investigate the issue. Thank you.

  • Default User Avatar

    I need advice please. Your bit sequence has lenght of 212. But if you count all bit spaces from image(12x12, 6x4 6x4 2x4 2x4 = 208) it only adds up to 208 where do the last 4 bits come from. my code pass 183 cases but fails with 23 with only last letter being incorrect. It definatelly must be with those last 4 bits which I m missing.

  • Default User Avatar

    Thank you very much.

  • Default User Avatar

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

  • Default User Avatar

    I m in idiot sorry bro I accidently renamed it ;)

  • Default User Avatar

    it seems like your testing function is not working I m getting this error:
    Traceback (most recent call last):
    File "main.py", line 3, in
    Test.assert_equals(get_strings("Chicago"), "c:**,h:,i:,a:,g:,o:*")
    NameError: name 'get_strings' is not defined

    Can you please look into it I m using Python.