Home > Back-end >  2021-02-14: suppose N location in a row, down to 1 ~ N, N must be greater than or equal to 2, at the
2021-02-14: suppose N location in a row, down to 1 ~ N, N must be greater than or equal to 2, at the

Time:02-15

2021-02-14: suppose N location in a row, down to 1 ~ N, N must be greater than or equal to 2, at the beginning of the robot on the position of M (M must be one of the 1 ~ N), if a robot to 1 location, so only the right next to 2 position; If a robot to N position, the next step can only be left to N - 1 position; If a robot came to the middle position, the next step may go to the left or right away; K rules robot must go further, can eventually came to P position (P is also one of the 1 ~ N) how many kinds of method? Given four parameters N, M, K, P, returns number method, # # f greatly architects a daily topic
  • Related