GO Solution For UVa 10721 - Bar Codes. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

Figure 1: Bar-code over 7 units with 4 bars

A bar-code symbol consists of alternating dark and light bars, starting with a dark bar on the left. Each bar is a number of units wide. Figure 1 shows a bar-code symbol consisting of 4 bars that extend over 1+2+ 3 + 1 = 7 units.

In general, the bar cod


You can find the full details of the problem Bar Codes at UVa Online Judge

Sample Input

7 4 3
7 4 2

Sample Output


Solution: Please check the main.go snippet for the solution.

Solution originally posted at: Github by @codingsince1985