Ad
  • Default User Avatar

    Yes I think something wrong with tests.
    For n=311 m=10131 the test say
    Expected
    : 71692423655005205742475058887780204076478173193756056534361211129546043664445431944499667343853437837654574420941236308628252496657306440547150042542033422966836724604589618585313406081996653652790266390363056344043348948460554622622321171105487547727180837279888801878208802638642014343289117270679561876255479945479493366274871820692161157345919355451766369038588713612753294660349103505913526811646787927664100720765220490895831907659845589011856751027720648370221163404996407536536129106286633176735546895953041399202973489205488615661260572453354171008663345444479871804393330314581222773072596927
    to equal
    : 3

  • Default User Avatar

    else key word is useless even if you don't include it, it would still run fine and it would even look more readable

  • Custom User Avatar

    Random tests are broken for golang. Also test Height(311, 10131) expecting incorrect result (mine is "716924...", expecting "378359...")
    Somebody made really bad translation for this kata and also same kata for 1 kyu
    Very disappointing

  • Custom User Avatar

    Python globals are not shared between modules, though if you need totally global name you can use builtins

  • Custom User Avatar

    @FischerEnterprise
    Thank you very much for your comment about counting details. It should be added to the kata description.

  • Custom User Avatar
    else:
        print('???')
        break
    

    Nice

  • Custom User Avatar

    I'm afraid there is something bad with your golang runtime env.
    When I ran my code locally (e.g. Height(311, 10131) ) it calculated the proper result 71692....6927, but in codewars environment the same code gave 0.

  • Custom User Avatar

    Let me notice that for z=1 (as well as for z=0) the sequence is immediately convergent (in fact it is constant). I've the impression that those cases are not verified by tests as well as by some solutions. So maybe the test suite should be extended eg. by expectations f(1, 0)==1 as well as f(0, 0)==0 ?