Editorial for JDCC '16 Contest 3 P2 - The Number Eight
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Do some math to hardcode the drawings. We can consider this as two operations: line across and lines down.
Order
Do the operations in the order: across, down, across, down, across.
Line Across
Print stars. Let's call this number because it is the width of the eight.
Line Down
Print a star; print spaces; print another star. (next line)
Do the above times.
Time Complexity:
Comments