[LeetCode] Smallest Value After Replacing With Sum of Prime Factors

1 · · Dec. 18, 2022, 4:28 a.m.
2507. Smallest Value After Replacing With Sum of Prime Factors You are given a positive integer n. Continuously replace n with the sum of its prime factors. Note that if a prime factor divides n multiple times, it should be included in the sum as many times as it divides n. Return the smallest value n will take on. ...