✅ C++ || Simple Solution || Easy Solution
\nclass Solution {\npublic:\n    vector<int> findPrimeFactors(int n) {\n    vector<int> prime_factors;\n    // 2 is the smallest prime number\n    while (n % 2 
```\nclass Solution {\npublic:\n    vector<int> findPrimeFactors(int n) {\n    vector<int> prime_factors;\n    // 2 is the smallest prime number\n    while (n % 2 == 0) {\n        prime_factors.push_back(2);\n        n = n / 2;\n    }\n    // check for other prime numbers up to sqrt(n)\n    for (int i = 3; i <= sqrt(n); i += 2) {\n        while (n % i == 0) {\n            prime_factors.push_back(i);\n            n = n / i;\n        }\n    }\n    // if n is a prime number itself, add it to the list\n    if (n > 2) {\n        prime_factors.push_back(n);\n    }\n    return prime_factors;\n}\n    int smallestValue(int n) {\n        while (true) {\n        vector<int> prime_factors = findPrimeFactors(n);\n        int new_n = 0;\n        for (int i : prime_factors) {\n            new_n += i;\n        }\n        if (new_n == n) {\n            return n;\n        } else {\n            n = new_n;\n        }\n    }\n    }\n};\n```\n**Please upvote if it was helpful for you, thank you!**
['C']