We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我理解交互式的意思应该是程序运行有输入时等待输入,有输出时及时输出。 但是我实际使用下来发现(使用python) 比如 input("等待输入:") 仍然直接: Nonzero Exit Status
比如 import time print(1); time.sleep(5); print(2);
仍然是等程序执行完返回最终结果 1 2 而不是先输出1等待5秒后再输出2
不知道是不是我用法不对?还是本身就是这么设计的
The text was updated successfully, but these errors were encountered:
您可以查看在线 demo https://goj.ac/terminal 或者 使用 go-judge-shell 测试
Sorry, something went wrong.
嗯嗯,可以了。感谢回复和解答。 另有办法判断当前程序是等待输入状态吗,比如python中input或者c++中std::cin时客户端如何感知应该发起3 - input类型的调用
您应当和和用户程序协商好通讯协议,包括输入和输出的内容以及顺序。由于管道通讯自带缓存,并不能可靠的判断输入是否被读取或者是否在等待读取。
No branches or pull requests
我理解交互式的意思应该是程序运行有输入时等待输入,有输出时及时输出。
但是我实际使用下来发现(使用python)
比如
input("等待输入:")
仍然直接:
Nonzero Exit Status
比如
import time
print(1);
time.sleep(5);
print(2);
仍然是等程序执行完返回最终结果
1
2
而不是先输出1等待5秒后再输出2
不知道是不是我用法不对?还是本身就是这么设计的
The text was updated successfully, but these errors were encountered: