Company: Ola
Difficulty: medium
Pass The Ball Problem Description Assume that a group of N players are playing a game. In this game, a player must pass the ball to another player. A player P holds the ball at the beginning of the game. A maximum of X moves are allowed while passing 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. Output Specification Return an integer