Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Carefully parse each line according to the following rules: * If we start a block comment and we aren't in a block, then we will skip over the next two characters and change our state to be in a block. * If we end a block comment and we are in a block, then we will skip over the next two characters and change our state to be *not* in a block. * If we start a line comment and we aren't in a block, then we will ignore the rest of the line. * If we aren't in a block comment (and it wasn't the start of a comment), we will record the character we are at. * At the end of each line, if we aren't in a block, we will record the line.