Given a positive integer, N.
Euler phi function denoted by ϕ(n) counts the number of positive integers up to n that are co-prime to n.
Let us have a function F as:
F(x)=∑xi=1∑ij=1ϕ(i)×ϕ(j)
Task
Your task is to calculate the value of F(N). Since the value can be large output it modulo 109+7.
Example
Assumptions
Approach
Function description
Complete the solve function provided in the editor. This function takes the following single parameter and returns the value of the function F:
Input format
Note: This is the input format that you must use to provide custom input (available above the Compile and Test button).
Output format
For each test case, print in a new line, a single integer denoting the value of F(N) mod 109+7.
Constraints
1≤T≤102
1≤N≤105
Code snippets (also called starter code/boilerplate code)
This question has code snippets for C, CPP, Java, and Python.
Test Case 1
Given
Approach
Test Case 2
Given
Approach