rendered paste body 0 250000 0
10 296160 1744
20 342320 1744
30 388480 1744
40 434640 3488
50 480800 3488
60 526960 3488
70 573120 3488
80 619280 5232
90 665440 5232
100 711600 5232
110 757760 5232
120 803920 6976
----
import math
round_trip_cost = 104*2+10
cargo_capacity = 203
food_price = 34
water_price = 23
energy_price = 100
subsidy = 250000
print '%8s %8s %8s'%('pop', 'profit', 'APs')
for pop in range(0, 500, 10):
upkeep_cost = pop*(3*food_price+2*water_price-5.25*energy_price)
profit = pop*200-upkeep_cost+subsidy/8.
trips = math.ceil(pop*5.25/cargo_capacity)
ap = round_trip_cost*trips*8
print '%8d %8d %8d'%(pop, profit*8, ap)