Round 229 Div-2

Ques A solution