https://www.luogu.com.cn/record/148650620 vs. https://www.luogu.com.cn/record/148651188,样例 #1 下载下来输出正确,洛谷 IDE 输出正确,提交 454545 pts。
加了一个 .strip() 删除空白字符后 AC,可以判定为输入数据可能有空格或 \r,使用 Python 或 C getchar()、getline() 之类的要小心。
.strip()
\r
getchar()
getline()
其实之前好像有一篇帖,但是看不了了。