It is not possible for a heat engine to be 100% efficient. The Laws of Thermodynamics explicitly explains that you can never transfer heat perfectly simply because during the flow of heat (either at low or high temperature) some of the initial input heat have been transformed into work.