Pergunta de entrevista da empresa ZoomInfo

Compute the total price according to a table. How to realize ParseInt?