Discussion about this post

User's avatar
Azor Ahai's avatar

I wondered what can be the pre final stage cases for this problem, so I assumed an initial number of x,y, and z for each type of chameleon and assumed that everyone converts to the z type. So in my version of a pre final stage (assuming pairing of x-y chameleons until one of the types is exhausted), we would be left with (x-y) or (y-x) number of single coloured chameleons depending upon what's positive. Then, by taking examples for 1,2,3 to be the number at pre final stage, one can figure out the pattern that the pre final stage number should be divisible by 3.

Expand full comment
Akhil Shukla's avatar

Well I used one method, correct me if i am wrong, taking 3 chameleons case, and we have to convert them to red, so converting them to Red until one color has 0 chameleons left, as asked in above problem (28,0,2). Then the other color left i.e. blue color, will be reduced by 3 (taking 1 of red and 1 of blue changing them to green, then taking 1 blue and 1 green to convert them to Red, doing this twice), doing this it will give (27,2,1), then (29,1,0) and we can continue no further, so the remaining color should be a multiple of 3(or mod%3=0) to be able to convert all chameleons to Red or any other color.

Expand full comment
3 more comments...

No posts