Without caring the cost of battery then battery C last the longest for average of 24 hrs. but if we include the cost, then we should calculate the cost per hour.
A. $ 0.5 / 12 hrs = $ 0.042 per hr
B. $ 2 / 18 hrs = $ 0.11 per hr
C. $3.50 / 24 hrs = $ 0.15 per hrs
So the cheapest is battery A