<prompt> Nambari mbaya ni nambari kamili chanya ambayo inaweza kugawanywa kwa a, b, au c.Kwa kuzingatia nambari nne n, a, b, na c, hurejesha nth nambari mbaya.Mfano wa 1:Ingizo: n 3, a 2, b 3, c 5Pato: 4Maelezo: Nambari mbovu ni 2, 3, 4, 5, 6, 8, 9, 10... Ya 3 ni 4.Mfano wa 2:Ingizo: n 4, a 2, b 3, c 4Pato: 6Maelezo: Nambari mbovu ni 2, 3, 4, 6, 8, 9, 10, 12... Ya 4 ni 6.Mfano wa 3:Ingizo: n 5, a 2, b 11, c 13Pato: 10Maelezo: Nambari mbovu ni 2, 4, 6, 8, 10, 11, 12, 13... Ya 5 ni 10.Vikwazo: 1 n, a, b, c 109 1 a b c 1018 Imehakikishwa kuwa matokeo yatakuwa katika anuwai 1, 2 109.  <response>: kuagiza hisabatidef nthUglyNumbern, a, b, c: kushoto, kulia 1, int2e9 lcm_ab, lcm_ac, lcm_bc a b math.gcda, b, a c math.gcda, c, b c math.gcdb, c lcm_abc a lcm_bc math.gcda, lcm_bc wakati kushoto kulia: katikati kushoto kulia - kushoto 2 hesabu katikati a katikati b katikati c - katikati lcm_ab - katikati lcm_ac - katikati lcm_bc katikati lcm_abc ikiwa hesabu 