https://www.codechef.com/problems/DIGIMU

Can anyone help me with this question
https://www.codechef.com/problems/DIGIMU