文章目录 输入 注意事项 输入 有些题目是没有终止符的,需要一直输入,这种情况需要代码这么写: while 1: try: x=input() pass except: break C++代码如下: while(scanf("%d"