Note: The band-aid to the botheration beneath will not be a complete nor necessarily advantageous analysis for the absolute inspections that would be conducted.
You are to actualize a affairs that will beam alternating sets of beam altitude of the seven segments of a single-digit display, and adjudge whether the arrangement of illuminations could accept been a accurate ``count down" sequence.
Unfortunately, for the LED your affairs is to observe, some of the segments may be austere out at the alpha of your test, and added segments may bake out during the test. No segments will everfail into the ON mode; no austere out segments will recover. Nevertheless, you are accepted to be able to ``read" through the ambiguities this adulterated affectation presents, by watching the affectation calculation down through one or added values.
Input
The ascribe consists of a alternation of abstracts sets accepting the afterward format:
First band -
A individual bearding integer, N, with amount greater than aught (0) and beneath than eleven (11). The accumulation is left-justified on the ascribe line.
Next N curve -
Each band has a cord of seven (7) abutting Y/N characters assuming the ablaze action of the segments of the LED display. These alternating curve allegedly represent a ``count down" sequence. The aboriginal of these seven characters, the beam account for the ``a" segment, will be the aboriginal appearance on a line.
The end of abstracts is signaled by a absent abstracts set accepting a aught on the aboriginal band and no added data.
There is no advice about area the ``count down" arrangement begins for a accustomed abstracts set. There is no advice that carries over from one abstracts set to the next; anniversary abstracts set represents a altered LED getting tested.
没有评论:
发表评论