how can you do the lcm to somethimg like 12000 without having to do all of that mathematics just to make it quicker?

Do you mean least common multiple?