Find the optimum sequence of keyboard hits to produce the most repeated characters -


you provided 4 possible operations can done on editor (each operation requires one keyboard hit).

  1. a
  2. ctrl+a
  3. ctrl+c
  4. ctrl+v

now can hit keyboard n times , need find maximum number of a's can printed. print sequence of keyboard hits.

googled answer:

http://podlipensky.com/post/2011/02/07/sundays-puzzle.aspx


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -