Ambev Interview Question

Lógica