← All problemsSign in

Sum of tokens

John is having tokens of all the number starting from 1 to a certain amount. He has to calculate total amount of these tokens. He will enter the highest amount of token , then you have to tell sum of all tokens starting from 1 to highest. Example if he enters 5 then you have to calculate 1+2+3+4+5. Input Input will consist of single number showing upper limit of token. Output Output will consi

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start