Mars shot

Challenge
No

Cthulhu is planning a trip to Mars. A few goats will live in Earth's first base on another planet. Help him work out consumables needed for the trip. You can download a start worksheet.

The worksheet starts like this:

Start

Small goats need 60 kilos of feed per month, medium goats need 130, and large goats need 200. (Assume goats don't grow during the voyage.) Space-grade goat food costs $32.50 per kilo.

Water is recycled, but there's some loss every month. To top them up, small goats need 2.2 liters per month, medium goats need 5.1, and large goats need 9.4. Space-grade goat water costs $17.23 per liter.

Oxygen is recycled, too, but there's also some loss every month. To top them up, small goats need 2.8 liters per month, medium goats need 6.9, and large goats need 12.3. Space-grade goat oxy costs $31.84 per liter.

Users fill in the number of goats and the voyage length, then hit the button. Here's some output:

Output

Submit your solution to this site as usual, not to Moodle. The usual coding standards apply, including secluded cells.

Attachments