m∗a
m
... counta
... number3*0.3 → 0.3 0.3 0.3
a:b
a
... first numberb
... last number3:6 → 3 4 5 6
8:5 → 8 7 6 5
0.1:2.9 → 0.1 1.1 2.1
m∗aDd
m
... number counta
... first numberd
... difference4*0.5D0.1 → 0.5 0.6 0.7 0.8
3*8D-2 → 8 6 4
m∗a:b
m
... number counta
... first numberb
... last number4*0.5:0.8 → 0.5 0.6 0.7 0.8
3*8:4 → 8 6 4
a:bDd
a
... first numberb
... last numberd
... difference2.9:3.1D0.1 → 2.9 3.0 3.1
8.6:8.3D0.1 → 8.6 8.5 8.4 8.3
3.0:3.5D0.2 → 3.0 3.25 3.5
In some groups of input data, a regular repetition of certain sequences of numbers can be observed, which can also be exploited. At the first occurrence, a sequence is defined by enclosing it in parentheses, which are written in the form =X
, where X
is any letter of the English alphabet with the exception of E and D. This letter is the identifier of the sequence and it is valid for the entire group, not the batch. The parentheses of sequences can overlap from left to right.
=A 3 2 =B 8 9 =C 7.23 =B =A =C
defines three sequences:
A → 3 2 8 9 7.23 B → 8 9 7.23 C → 7.23
At the next occurence, the sequence is replaced by =X
or =dX
, where d
is the difference by which the whole sequence will be increased.
=G 0.3 0.8 =G 0.6 =G 1.5 =G → 0.3 0.8 0.6 0.3 0.8 1.5 0.3 0.8
=G 0.3 0.8 =G 0.6 =2G 1.5 =0.2G → 0.3 0.8 0.6 2.3 2.8 1.5 0.5 1.0
If a sequence is repeated back-to-back several times, it may be written in the form m*(sequence)
, where m
is the sequence repetition count. For the sequence enclosed by the paretheses, it is possible to use all of the condensed notations described above.
3*(4 3) → 4 3 4 3 4 3
2*(=A 4 3 =A =2A) → 4 3 6 5 4 3 6 5