JustPark interview question

Write a simple function / program to solve a word problem.