Mars is very cold, things like the battery can't handle these temperatures. It's been thoroughly analysed, here is a quote from the white paper [0]:
"""H. Thermal System
The helicopter must survive the cold of the night on Mars where temperatures can drop to -100 C or lower. The most critical component is the battery which is kept above -15 C through the night as it powers Kapton film heaters attached to the battery cells. The avionics boards in the ECM surround the battery and are also kept at an elevated temperature by virtue of their proximity to the warm battery assembly. Insulation around the avionics boards is provided by a carbon-dioxide gap of 3 cm width. Additional insulation can be provided by replacing the carbon-dioxide gas with an Aerogel formulation. The outermost fuselage thermal coating is from Sheldahl with Solar absorptivity α = 0.8 and infra-red (IR) emissivity = 0.1.
In addition to thermal losses through the gas gap (or aerogel), additional losses occur due to conduction in the mast as well as through the copper wiring that penetrate the ECM from the mast. To minimize the latter, the wire gauges are selected to be of the thinnest gauges that can still support the current draw during operations without overheating. Prior to flight, under the control of the FPGA, the thermal system powers on heaters in the motor control boards that have been exposed to the ambient temperatures. The internal battery temperature is brought up to 5 C to allow hi-power energy extraction from the cells. During operation the ECM and battery warm up as a result of avionics operations and battery self-heating. However, the thermal inertia of the elements is such that for the short flights of the helicopter, there is no overheating."""
[0] "Mars Helicopter Technology Demonstrator" https://rotorcraft.arc.nasa.gov/Publications/files/Balaram_A...
EDIT: some detail on the battery capacity from section G:
"A de-rated end-of-life battery capacity of 35.75 Wh is available for use. Of this capacity, 10.73 Wh (30%) is kept as reserve, night-time survival energy usage is estimated at 21 Wh for typical operation in the northern latitudes in the spring season, and approximately 10 Wh is available for flight. Assuming that 20% of the power is at the peak load of 510 W and 80% is at a continuous load of 360 W, approximately 90 sec of flight is possible. These energy projections represent conservative worst-case end-of-mission battery performance at 0 C initial temperature. More moderate power loads will extend the flight time."