first exercise, passed but I think I can make it faster....
vectorized compute cost