8 lines
243 B
Mojo
Generated
8 lines
243 B
Mojo
Generated
def path_cost(setup: Int, per_segment: Int, segments: Int) -> Int:
|
|
# setup plus per-segment cost, then multiplied across the segments
|
|
return setup + per_segment * segments
|
|
|
|
|
|
def main():
|
|
print("Total distance:", path_cost(2, 3, 4))
|