A positive integer x is called a regular number, if and only if there exist a non-negative integer k, such that . For some reason, such a number is also refered to as an ugly number. Below are the first few regular numbers:
It turns out that regular numbers are not so regular after all. In fact, regular numbers are quite rare. There are only regular numbers and just regular numbers .
Given an integer n, and exponent e, we are tasked to write a function that counts the number of regular numbers less than or equal to .

Solution Stats

11 Solutions

6 Solvers

Last Solution submitted on Dec 12, 2023

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...