This is a generalization of Rupees and Paise.
Stan entered a departmental store with A dollars and B cents. When he exited the store, he had B/p dollars and A cents, where B/p is an integer. It was observed that when Stan came out, he had precisely 1/p times the money he had when he came in.
Given that each of A, B and p is a positive integer, with 2 ≤ p ≤ 99, determine the values of p for which this is possible. What values of p generate more than one solution?