Count numbers of the form 3^x * 5^y within a range

Given a closed interval [L, R] (0 < L <= R), count how many integers in the interval can be written as:

n = 3^x * 5^y, where x and y are non-negative integers (x, y >= 0).

Return the num...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: