NMNMX - Editorial

Yes I gave same answer

This is the euler totient function
For prime numbers it is (p - 1). for the rest
https://en.wikipedia.org/wiki/Euler’s_totient_function#Computing_Euler’s_totient_function

thanks till now the clearest explanation.

1 Like

Thanks bro.

1 Like

Try 3-tower coloring question of hackerrank and read its editorial.

1 Like

@vijju123: Thank you. That explanation was very helpful.

1 Like

@ritam777
During the contest, I was trying to do this but could not. Thank you so much as I now understand it :))

Sorry I am not qualifed to upvote otherwise I would have.

Why do subset or subsequence doesn’t matter?