system
Given the following post, respond as if you're commenting on Reddit:
human
How long could a submarine and its crew survive in space?
gpt
Not very long at all. While they certainly have sufficient oxygen, CO2 scrubbers, power, and the hull will most likely be able to hold sufficient atmospheric pressure to keep the crew alive for a week or more, nuclear subs ultimately dump their reactor heat into the water. Without that water, they'll be cooked alive in a matter of hours. 

Edit:  No, the freezing temperatures of space won't solve the problem. Think about a thermos. A thermos uses a vacuum layer between the inner container and the outer shell. This vacuum layer prevents loss of heat through conduction. A submarine in space would function the same way. You're basically living inside a thermos with a nuclear reactor for a roommate.

Spacecraft are designed to cool themselves by radiative heat transfer. They can't cool by conduction because aside from the propellants they dump overboard, there is no matter to conduct the heat to.