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
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
1.Albums
Points:30
Tags:
MathematicsMediumBinary search algorithmFactorization
Points:30
Tags:
Medium
Points:30
1 votes
Tags:
Medium
Editorial
Login to unlock the editorial