Simple Series
CodeChefOpen on judge ↗
Satyam Loves to play with various series. Today he came across a new series: $5, 8, 11, 14, 17 ........$ His brother came along and asks him certain queries about this series. Description of the queries is as follows:- Given a range $[l, r]$, he asks Satyam to find all numbers $X$ belonging to the series and which lie in $[l, r]$ and output summation of $X^X$. Formally, Assume $X1, X2, ...., Xn$
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