A hypothetical thermodynamic cycle put out by Leonard Carnot is known as the Carnot engine.
It calculates the highest feasible efficiency that a heat engine can have when converting heat into work and when operating between two reservoirs.
All of the heat collected from the source must be turned to work for the Carnot engine to operate at efficiency.
Efficiency is determined by the engine's work-to-heat-absorbed ratio. . Where is the Absorbed Heat from the source, and is the Rejected Heat from the Sink.
Observe that, the efficiency will be if is equal to zero.
This is not possible since some amount of heat gets rejected to the sink.