Nth Ugly Number Problem

Nth Ugly Number Problem — ExecCode Easy DSA Practice

Solve the Nth Ugly Number problem on ExecCode. Free online easy DSA practice in Math. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Description You are given the input needed to solve Nth Ugly Number. Your task is to compute the required answer and return nth ugly number. Integer n.

Examples

Input {"n": 10}; Output 12. Input {"n": 1}; Output 1. Input {"n": 7}; Output 8

Constraints

1 <= n <= 1690

Practice Nth Ugly Number free on ExecCode. Browse DSA problems, topic map, and placement guides.