Back
Close

Inca knots

Statement

 Goal

The input data represents knot-records, strings with knots, used by the Incas to store information.

Each knot-record can be a three digit number.

Each digit is represented by a knot group.

Knot groups consists of a specific length of one character type: &

A & in the left group equals 100.
A & in the middle group equals 10.
A & in the right group equals 1.

The knot groups are separated by hyphens. Two in the ends and three between the knot groups.


Example:  --&---&&---&&&--  = 123

Calculate the sum of all the strings, and make a new string representing the total.
Input
Line 1: An integer n for the number of knot-records.
Next n lines: a string representing a knot-record.
Output
Line 1: A knot-record representing the sum of all the knot-records.
Constraints
1 ≤ n ≤ 100
0 ≤ sum( knot-record ) < 1000
Example
Input
2
--&---&---&--
--&---&---&--
Output
--&&---&&---&&--

Game modes
Fastest, Shortest

Test cases
222 alpacas Test
Input
2 --&---&---&-- --&---&---&--
Output
--&&---&&---&&--

Validator 1 Validator
Input
3 --&---&---&-- --&---&---&-- --&---&---&--
Output
--&&&---&&&---&&&--

203 llamas Test
Input
2 --&&-------- --------&&&--
Output
--&&------&&&--

Validator 2 Validator
Input
2 -----&----- --&&&&&&&&&--------
Output
--&&&&&&&&&---&-----

A brand new cotton string Test
Input
2 ---------- ----------
Output
----------

Validator 3 Validator
Input
3 ---------- ---------- ----------
Output
----------

101 peaceful years Test
Input
3 -----&&&&---&&-- -----&&&&---&&&-- -----&---&&&&&&--
Output
--&------&--

Validator 4 Validator
Input
3 -----&&&&---&&-- -----&&&&---&&&-- -----&&---&&&&&&--
Output
--&---&---&--

168 Spanish conquistadors Test
Input
15 -----&---&-- -----&----- -----&&&----- -----&---&&-- -----&---&-- -----&&----- -----&---&-- -----&---&-- -----&&---&-- -----&---&-- --------&-- --------&&-- --------&&&&-- -----&---&-- --------&&--
Output
--&---&&&&&&---&&&&&&&&--

Validator 5 Validator
Input
15 -----&---&-- -----&----- -----&&&----- -----&---&-- -----&---&-- -----&&----- -----&---&-- -----&---&-- -----&---&-- -----&---&-- --------&-- --------&&-- --&------&&&&-- --&------&-- --&------&&--
Output
--&&&&---&&&&---&&&&&&&--

999 kg Gold Test
Input
99 -----&---&-- ---------- -----&---&-- -----&---&-- --------&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- --------&-- -----&---&-- --------&-- -----&&---&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- --------&-- -----&---&-- -----&---&-- ---------- -----&---&-- -----&&---&-- -----&---&&-- ---------- --------&-- -----&---&-- -----&---&-- -----&---&-- ---------- -----&---&-- -----&---&-- -----&---&-- -----&---&-- -----&&---&&-- -----&---&-- -----&---&-- ---------- -----&---&-- -----&---&-- -----&---&-- -----&---&-- --------&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- --------&-- -----&---&-- ---------- -----&---&-- -----&---&-- --------&-- ---------- -----&---&-- -----&&---&-- -----&---&-- -----&---&-- -----&---&-- --------&-- -----&---&-- -----&---&-- -----&---&-- ---------- --------&-- -----&---&-- -----&&---&-- -----&---&-- -----&---&-- --------&-- -----&---&-- -----&---&-- -----&---&-- ---------- -----&---&-- --&---&---&-- -----&---&-- ---------- -----&---&-- -----&---&-- -----&---&-- ---------- -----&---&-- -----&---&-- --------&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- ---------- -----&---&-- -----&---&-- -----&---&-- -----&---&-- -----&&---&--
Output
--&&&&&&&&&---&&&&&&&&&---&&&&&&&&&--

Validator 6 Validator
Input
99 -----&---&-- ---------- -----&---&-- -----&---&-- --------&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- --------&-- -----&---&-- --------&-- -----&&---&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- --------&-- -----&---&-- -----&---&-- ---------- -----&---&-- -----&&---&-- -----&---&&-- ---------- --------&-- -----&---&-- -----&---&-- -----&---&-- ---------- -----&---&-- -----&---&-- -----&---&-- -----&---&-- -----&&---&&-- -----&---&-- -----&---&-- ---------- -----&---&-- -----&---&-- -----&---&-- -----&---&-- --------&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- --------&-- -----&---&-- ---------- -----&---&-- -----&---&-- --------&-- ---------- -----&---&-- -----&&---&-- -----&---&-- -----&---&-- -----&---&-- --------&-- -----&---&-- -----&---&-- -----&---&-- ---------- --------&-- -----&---&-- -----&&---&-- -----&---&-- -----&---&-- --------&-- -----&---&-- -----&---&-- -----&---&-- ---------- -----&---&-- --&---&---&-- -----&---&-- ---------- -----&---&-- -----&---&-- -----&---&-- ---------- -----&---&-- -----&---&-- --------&-- -----&---&-- -----&---&-- -----&---&-- -----&---&-- ---------- -----&---&-- -----&---&-- --------&-- -----&---&-- -----&&---&--
Output
--&&&&&&&&&---&&&&&&&&---&&&&&&&&&--

758 dead from smallpox Test
Input
27 --&&---&---&&-- ---------- ---------- ---------- ---------- --&-------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --&---&---&&&-- ---------- ---------- ---------- --&---&&----- ---------- ---------- --------&-- ---------- --&&---&---&&-- ---------- ---------- ---------- ----------
Output
--&&&&&&&---&&&&&---&&&&&&&&--

Validator 7 Validator
Input
27 --&&---&---&&-- ---------- ---------- ---------- ---------- --&-------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --&---&---&&&-- ---------- ---------- ---------- --&---&&----- ---------- ---------- --------&-- ---------- --&&---&---&&-- ---------- ---------- --------&&-- ----------
Output
--&&&&&&&---&&&&&&-----

Solution language

Solution

Stub generator input