Gridspace Interview Question

one coding question and one math problem (like a word problem)