Company: Common Wealth
Difficulty: medium
\ \ Pass the Ball \ \ \ \ Assume that a group of N players are playing. In this game, a player must pass the ball to another player. A player P starts the ball at the beginning of the game. A maximum of X moves are allowed to pass the ball such that it ends up with the same player who started the game. \ \ Given below is the condition that must be followed by all the players while passing the ball: \ \ \ A player K1 can pass the ball to another player K2 if K1 divides K2 or K2 divides K1. \ \ \ Your task is to find and return an integer value representing the number of possible ways to complete the game. \ \ \ Note: A game is considered as \\\"complete\\\" if the ball ends up with the player who started it. \ \ \ \ \ Input Specification: \ \ input1: An integer value N, representing the number of players. \ input2: An integer value P, representing the player who starts the game. \ input3: An integer value X, representing the maximum number of moves allowed to pass the ball. \ \ \ \ \ Ou