Total Triplets
CodeChefOpen on judge ↗
Chef taught Shobhit about AP series. Yes, the very old one: a, a+d, a+2d, a+3d….and so on. Now to test his understanding on AP and combinatorics (art of counting) chef has given shobhit a task to find out total number of triplets which form an AP in the first n natural numbers staring from 1 all the way up to n. Since shobhit is scared by the complexity of the problem, he asks for your help in the
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