added ugly numbers solution