Help reuired in Problem

https://www.codechef.com/GLDT2021/problems/BITPER

How to solve this problem ??