Yet Another GCD Problem
CodeChefOpen on judge ↗
Given N, you are asked to solve... yet another GCD problem. $\displaystyle\sum_{i=1}^{N}\sum_{j=1}^{N}\sum_{k=1}^{i}\sum_{l=1}^{j}\gcd (k,i)\gcd(l,j)\gcd(i,j)$ Output the value of this summation modulo $1000000007$ ### Input Input consists of a single integer $N$. ### Output Output the value of the summation modulo 1000000007. ### Constraints $1 \leq N \leq 10^6$ ### Subtasks - 30 points : $
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start