Note that while the line range says delete (361 - 182 + 1)=
180 lines, the count suffix says delete
181 lines and wins, so it is equivalent to ":181,362d", and the file now contains 1-360 and 542-$, with the cursor sitting at pos 1 (
not after) of former line 542, new line 361.
https://www.unix.com/man-page/all/1posix/ex/
Delete
Synopsis:[2addr] d[elete][buffer][count][flags]
Delete the specified lines into a buffer (defaulting to the unnamed buffer), which shall become a line-mode buffer.
Flags can immediately follow the command name; see Command Line Parsing in ex .
Current line: Set to the line following the deleted lines, or to the last line in the edit buffer if that line is past the end of the edit buffer, or to zero if the edit buffer is empty.
Current column: Set to non- <blank>.
-------------------
count A positive decimal number. If count is specified, it shall be equivalent to specifying an additional address to the command, unless otherwise specified by the following command descriptions. The additional address shall be equal to the last address specified to the command (either explicitly or by default) plus count-1.