Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ... shows the first 11 ugly numbers. By convention, 1 is included. Write a program to find and print the N’th ugly number. Same as previous task with a minor difference - input value limit is 1000000, and output is str.
Input: N, int.
Output: N'th Ugly Number, str.
extremely_ugly(4) == '4' extremely_ugly(6) == '6' extremely_ugly(11) == '15' extremely_ugly(999) == '51018336'
How it’s used: Demonstrate that straight way can be very slow
Precondition: Given int is below or equal of 1000000
Idea for the mission was taken from ICPC challenge
CheckiO Extensions allow you to use local files to solve missions. More info in a blog post.
In order to install CheckiO client you'll need installed Python (version at least 3.8)
Install CheckiO Client first:
pip3 install checkio_client
Configure your tool
checkio --domain=py config --key=
Sync solutions into your local folder
(in beta testing) Launch local server so your browser can use it and sync solution between local file end extension on the fly. (doesn't work for safari)
checkio serv -d
Alternatevly, you can install Chrome extension or FF addon
checkio install-plugin --ff
checkio install-plugin --chromium