Can somebody help me with this ?

PORBLEM- CHEFSQ Problem - CodeChef
SOLUTION- Online Compiler and IDE - GeeksforGeeks
Somebody please tell where i went wrong .