Real numbers word problem

So I was doing some word problems of real numbers . When I was doing it from pw the teacher said the hcf or lcm will only come in the unit of the given number but in many questions the ans came in different units so how to identify it