Solve SRM 168, Div 2, Problem NumberGuesser