Ad
  • Default User Avatar

    One can solve the kata without cheating and make a true Quine, I/O is not necessary so I dont think this hint would be a good thing.

  • Default User Avatar

    The solution and test code are in separate compilation units. So the type of square in the solution does not matter for a successful compilation. The only required thing is that something called square is in the compiled solution and square is executable. Constants are placed in the executable memory by clang. The square constant contains machine codes corresponding to the following assembly program:

    mov eax, edi  ; 89 f8
    mul eax       ; f7 e0
    ret           ; c3
    

    (The input argument is in edi and the result is returned in eax.)

  • Custom User Avatar

    That is correct, Chrono79. This was my first kata and I tried to keep things simple in order to see how the entire process of creating a new kata works without complicating things.

  • Custom User Avatar

    @ailijic Click reset if you still get those tests, the random tests have been updated to fix that and it's fixed.
    Adding multiple robberies has already been suggested, but the author wants to keep it simple, maybe a harder version could be made?

  • Custom User Avatar

    All random numbers are between 2 and 11!