I am little bit confused about the possible output of this puzzle.
My code is passing all the test cases but failing for Validator2 when submitting the code.
I have tried different logics but still failing. Problem description doesn’t give much rules as well.
Totally stuck and no clue.
@code_of_the_dead
note: le bouton forum du puzzle “Kaprekar’s routine” amène à la page d’accueil du forum, et non sur la page spécialisée du puzzle. j’ai du chercher Kaprekar pour arriver à cette page créée par un utilisateur et non par CommunityBot. bref…
je planche sur le validator 2. je n’ai pas de valeur en dur. je remplis juste un tableau. quand je l’affiche, je vois bien le left-padding des zéros. qu’aurais-je pu oublier?
I could finally find out after some errands. adding some customized tests (i.e. other values of n1s than the ones in the given tests). I focused too much on the leading 0s.
hello @otpv, i have also a problem with validator 2. (got 100% in ide)
I m not sure about the answer awaited by the submission for non covered tests in the ide.
Can you tell me what you answer for a random number like 24356 ?
is it:
82962
82962 75933 63954 61974
24356 41976 82962 75933 63954 61974
24356 41976 82962 75933 63954 61974 82962
?
I don’t understand my mystake .
thanks.
For 24356 I get 82962 75933 63954 61974
With these constraints it definitively should be ranked easy.
I thought the point of this puzzle was to make you store numbers in both a hash table and a list and use the hash to check for previous appearance, but you don’t even need that.
I’ve seen solutions that perform a O(N) check at every step and still get 100%
Hi,
Just figured out the complet requirement honnestly, I don’t see a way to get it clear without access to contribution !!
For the one who have not this chance, you have to make a cycle detection and print only one period of this cycle.
The IDE test case and the description are totaly not on this important point.
I downvote, if something is chaned, I’ll revise my note.