class Solution {
public:
    vector<int> multiply(const vector<int>& A) {
        int len = A.size();
        vector<int>ret;
        for (int i = 0; i < len; i++) {
            int temp = 1;
            for (int j = 0; j < len; j++) {
                if (i != j) {
                    temp = temp * A[j];
                }
            }
            ret.push_back(temp);
        }
        return ret;
    }
};