Pergunta de entrevista da empresa Belvedere Trading

Was sent a math and coding challenge.