If you have WA 9 due to recently added new tests
Try below test with empty line as a text:
--- start of input ---
world
#
--- end of input ---
Be careful, input in HEX can be presented as:
77 6F 72 6C 64 0D 0A
23 0D 0A
0D 0A
The answer is:
--- start of output ---
0
--- end of output ---
Be careful about an empty line before 0.