Company: IBM India Software engineer_27april
Difficulty: medium
An ideal number is a positive integer whose only prime divisors are 3 and 5. Such numbers have the form: 3 x × 5 y , where x and y are non-negative integers. You are given t wo integers, low and high. Your task is to: Determine how many ideal numbers fall within the range [low, high], inclusive. Example Suppose low = 200 and high = 405. Output: 4 Powers of 3 and 5 Power 3 x 5 x 0 1 1 1 3 5 2 9 25 3 27 125 4 81 625 5 243 3125 6 729 15625 The ideal inte gers in the range [200, 405] inclusive: 3 2 * 5 2 = 9 * 25 = 225 3 5 * 5 0 = 243 * 1 = 243 3 1 * 5 3 = 3 * 125 = 375 3 4 * 5 1 = 81 * 5 = 405 Constraints 1 ≤ low ≤ high ≤ 2 × 10 9 /* * Complete the 'getIdealNums' function below. * * The function is expected to return a LONG_INTEGER. * The function accepts following parameters: * 1. LONG_INTEGER low * 2. LONG_INTEGER high */ long getIdealNums(long low, long high) { }