Viridien interview question

math related problems