Problem 136 -- Ugly Numbers

read problem

Tips

This problem requires you fully understand the meaning of ugly numbers before doing anything else. Once you have done this, p136 is really simple stuff.

My program ran for several minutes before finding the answer. Once you get the answer, use a single printf() statement as your solution.

If you feel 11 examples are not enough, I can give you some more:

1	2	3	4	5	6	8	9	10	12	
15	16	18	20	24	25	27	30	32	36	
40	45	48	50	54	60	64	72	75	80	
81	90	96	100	108	120	125	128	135	144...