Tri-Coins
CodeChefOpen on judge ↗
Elizabeth belongs to a very rich family which owns many gold mines. Today, she brought N gold coins and decided to form a triangle using these coins. Isn't it strange? Elizabeth has a unusual way of forming a triangle using gold coins, which is described as follows: She puts 1 coin in the 1st row. then puts 2 coins in the 2nd row. then puts 3 coins in the 3rd row. and so on as shown in the given
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