Aladdin and Euler Totient
CodeChefOpen on judge ↗
One day, Aladdin was was challenged by Euler with a very hard maths problem. $f(N) = \sum_{i=1}^{N} (\sum_{j=1}^{i} floor(\frac{i}{j}) * \phi(j))$ Where floor() is the [Floor Function](https://mathworld.wolfram.com/FloorFunction.html) and $\phi()$ is the [Euler Totient Function](https://mathworld.wolfram.com/TotientFunction.html). Since the value of $f(N)$ could be very large, computer t
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