Am I Wrong?but i really feel it confusing.

  • 0

    the man will spend at most n steps(if he climb one step each time) to climb to the top,and at least n/2 or (n+1)/2 steps(if he climb two steps each time when n is an even num or climb two steps and one step the last time).
    Each number between n and n/2 or (n+1)/2 is possible.For example:
    when n is an even number
    thus,the result should be (n+1)/2 when the n is an even number,and n/2+1when n is an odd number???????

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.