Pregunta de entrevista de Point72

python problem was similar to leetcode easy