Beispiel #1
0
def get_mass_with_fuel(module_mass):
    fuel_mass = get_mass(module_mass)
    total_fuel = fuel_mass
    while fuel_mass > 0:
        fuel_mass = get_mass(fuel_mass)
        if fuel_mass < 0:
            fuel_mass = 0
        total_fuel += fuel_mass
    return total_fuel
Beispiel #2
0
 def test_12(self):
     self.assertEqual(2, get_mass(12))
Beispiel #3
0
 def test_1969(self):
     self.assertEqual(654, get_mass(1969))
Beispiel #4
0
 def test_100756(self):
     self.assertEqual(33583, get_mass(100756))
Beispiel #5
0
 def test_14(self):
     self.assertEqual(2, get_mass(14))