Microsoft interview question

it was an easy problem solving question