Yet Another Sum Problem
Practice
5 (1 votes)
Problem
20% Success 210 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code

You are given an integer \(N\).

Find the sum of \(\lfloor \frac{i}{j} \rfloor\) for all pairs of \(i\),\(j\) ( \(1 \leq i \leq N\) and \(1 \leq j \leq N\)), such that \(i\) and \(j\) are co-prime.

Input Format:

A single line contaning an integer \(N\).

Constraints:

\(1 \leq N \leq 10^5\)

Output format:

Print the required sum.

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:30
6 votes
Tags:
MathematicsMediumNumber Theory
Points:30
9 votes
Tags:
MediumAlgorithms
Points:30
2 votes
Tags:
MediumPrime FactorizationMathematicsOpenApprovedFactorization