Given a number N find the sum of the Euler Totient values of all the divisors of N.
Input: N = 5 Output: 5 Explanation: 1 and 5 are the factor of 5 and Φ(1) = 1 and Φ(5) = 4 and their sum is 4 + 1 = 5
Input: N = 1 Output: 1 Explanation: 1 is the only factor of 1 and Φ(1) = 1
You don't need to read input or print anything. Your task is to complete the function phiSum() which takes an integer N as input parameter and returns an integer, sum of the Euler Totient values of all the divisors of N.
Expected Time Complexity: O(1)
Expected Space Complexity: O(1)
1 <= N <= 106
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.