Pergunta de entrevista da empresa MathWorks

Matlab: weight sum. find numbers above a threshold... C++: GCD.