#ZOOMOP2. Zoom Operation
Zoom Operation
Zoom Operation
Use only 4 symbols: + ? - # (in circular order beginning with +) to zoom the number given.
Every segment of the number has one symbol more than the previous. (First Segment has a single symbol).
First symbol of every segment starts in the same column/row where the previous segment's last symbol ends.
First segment (orange color) → 1 symbol + (first symbol only.)
Second segment (green color) → 2 symbols ? - (starts with second symbol as first segment uses single element.)
Third segment (yellow color) → 3 symbols # + ? (starts with fourth symbol as 3 symbols have been used by first and second segments.)
Colors are shown for better understanding. See picture for more clarification.
Input
Given a number you have to apply zoom operation and print it.
Output
Print the pattern after Zoom Operation.
Examples
Input: 1</p>Output: +
Input: 2 Output: +? - -?+# # + ? -#+?-
Input: 3 Output: +? - -?+# # + ? -#+?-# + ? - # + #-?+#-?
Input: 4 Output: + ?-# + ?
Input: 5 Output: ?+ - #+?- # + ? -?+#-
For any clarification, refer to the picture above.
Try tutorial at ZOOMOP.