Ad
  • Default User Avatar
  • Custom User Avatar

    reset the trainer: that's not the current version. Surely you tried it a long time ago and it has been corrected in the meantime (or someone just did it).

  • Default User Avatar

    Java sample test reports on STDERR:

    ./src/test/java/SolutionTest.java:11: error: cannot find symbol
    assertTrue(Kata.fecolaast("chickadee","chote cake"));
    ^
    symbol: method fecolaast(String,String)
    location: class Kata
    1 error

  • Default User Avatar

    The C++ kata description says unsigned long. The max unsigned long number in C++ is about 10 digits, i.e. tests and control functions differ from problem description and it is a bug. Maybe the correct C++ description is unsigned long long, however the assert statements have to be updated in that case.

  • Custom User Avatar

    For those numbers the control function expects 65441025342 (at least now), have you clicked reset and tried again?

  • Default User Avatar

    The test is not mine. It is a random generated test during attempt test phase and test numbers are reported by codewars. I simply copy/paste that test and both solutions, mine and ready made one from unlocked solutions report the 95 as a result?? At the same time the test says that the result must be 97?

  • Custom User Avatar

    and the result is 95 again, i.e. it is not 97 as a test states preliminary

    Either there're problems with the reference solution or with your tests. I haven't solved this one, so I can't investigate.

    and the result is timeout

    Then your solution is not efficient enough.

  • Custom User Avatar

    I'm gonna close this issue, because it has changed to something else (unrelated). Below @GiacomoSorbi solved some C++ kata issues, so, click reset a few times and try again. If you still see that behaviour, report it in a separate post.

  • Default User Avatar

    Meanwhile, I unlock C++ solutions, and pass the same C++ test on my local PC with a a ready made unlocked solution and the result is 95 again, i.e. it is not 97 as a test states preliminary?!

    More over I passed a JS solution with 106 green test (during attempt) of total 100 huge tests and the result is timeout, please write an eficient algorithm??

  • Default User Avatar

    Why wrong?
    I tested the same C++11 source code, however the results are not same???

  • Custom User Avatar

    Not a question. It's impossible to tell what's wrong with your solution if nobody can see it.

  • Default User Avatar

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

  • Default User Avatar

    Yes, you are true. The bug is mine,
    however the bigest C++ unsigned long is 4 294 967 295,
    i.e about ten decimal digits,
    and at the same time random test (during attempt)
    passes me 12 digit numbers

    such as
    assert(solution({340445127495, 60921759657, 293857899522, 204267076497,
    347612393337, 258021570312, 25085430447, 14334531684, 168430747287,
    129010785156, 336861494574, 304608798285, 322526962890, 21501797526,
    146928949761, 272356101996, 28669063368, 136178050998, 150512582682,
    229352506944, 318943329969, 7167265842, 161263481445, 236519772786,
    351196026258, 118259886393, 172014380208, 39419962131, 236519772786,
    218601608181, 43003595052, 344028760416, 250854304470, 3583632921,
    297441532443, 57338126736, 175598013129, 293857899522, 211434342339,
    351196026258, 247270671549, 315359697048, 154096215603, 311776064127,
    139761683919, 222185241102, 143345316840, 351196026258, 351196026258,
    222185241102, 347612393337, 143345316840, 175598013129, 283107000759,
    225768874023, 336861494574, 10750898763, 186348911892, 240103405707,
    265188836154, 258021570312, 107508987630, 354779659179, 204267076497,
    46587227973, 193516177734, 75256291341, 254437937391, 25085430447,
    275939734917, 204267076497, 64505392578, 17918164605, 154096215603,
    193516177734, 326110595811, 243687038628, 68089025499, 225768874023,
    240103405707, 265188836154, 326110595811, 261605203233, 215017975260,
    286690633680, 78839924262, 53754493815, 100341721788, 89590823025,
    222185241102, 71672658420, 344028760416, 240103405707, 333277861653,
    311776064127}) == 340445127495) ;

  • Default User Avatar

    I'm not sure if that's the cause of this issue too or not, but there are negative numbers generated because of overflows.

  • Default User Avatar

    Thank you! Everything works now.

  • Loading more items...