Number Summation
CodeChefOpen on judge ↗
Problem description. Find the sum of all the distinct numbers formed by given digits (number formed should contain all digits). Input First line Contains TestCase T. Each next line contain an integer n followed by n digits. Output Print a single integer denoting the sum for each testcase in each line. Constraints: Subtask #1(30 points): 1 ≤ T ≤ 10 1 ≤ N ≤ 10 Subtask #2(70 points): 1 ≤
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