Solve SRM 164, Div 2, Problem Justifier