Or not trimming your input. I worked and reworked and reworked a problem once, the answer was some number in the billions. Eventually I gave up because I just couldn't work out where I went wrong. I then took someone's working solution and plugged my input in, and I was out by one, because it counted chars and I had a stray newline.
I'd like to say it only happened once, but, it happened again later that year... And then never again (because I pulled out code to always strip newlines after reading it in ;)
I'd like to say it only happened once, but, it happened again later that year... And then never again (because I pulled out code to always strip newlines after reading it in ;)