Runtime C# beats 100%
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(Sqrt(N))\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(n)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```csharp []\npublic class Solution {\n    public bool IsPrime(int n)\n    {\n        if(n < 2) return false;\n        for(int i = 2; i * i <= n; i++)\n        {\n            if(n % i == 0) return false;\n        }\n        return true;\n    }\n    public int DivideProduct(int n)\n    {\n        int totalDivideProduct = 0;\n        for(int i = 2; i * i <= n; i++)\n        {\n            while(n%i==0) \n            {\n                n/=i;\n                totalDivideProduct += i;\n            }\n\n        }\n        if(n > 1) totalDivideProduct += n;\n        return totalDivideProduct;\n    }\n    public int SmallestValue(int n) {\n        HashSet<int> seen = new HashSet<int>(); // L\u01B0u c\xE1c gi\xE1 tr\u1ECB \u0111\xE3 t\xEDnh\n        int result = DivideProduct(n);\n        \n        while(!IsPrime(result) && !seen.Contains(result)) \n        {\n            seen.Add(result); // Th\xEAm v\xE0o set \u0111\u1EC3 tr\xE1nh l\u1EB7p l\u1EA1i\n            result = DivideProduct(result);\n        }\n        \n        return result;\n    }\n}\n```
['C#']