Блог пользователя aya1909

Автор aya1909, история, 3 года назад, По-английски

given a number n, convert it into k such that k has all even digit with minimum no of operations. 1 operation is either increment or decrement n by 1.

example: Input 11 output -> 3 Input 199 output -> 1 Input 2018 output -> 2

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится