Pregunta de entrevista de MDP Infra (India)

One logic based coding question. sorry but i forgot