aya1909's blog

By aya1909, history, 5 weeks ago, In English

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

 
 
 
 
  • Vote: I like it
  • +3
  • Vote: I do not like it