代码表中的运行时错误



我为codechef的atm问题写了一个解决方案,得到了运行错误,但在我的计算机上运行良好。

问题- https://www.codechef.com/problems/HS08TEST/

我的代码
withdraw, balance = input().split()
print(balance if (int(withdraw)>=float(balance) or int(withdraw) %5 !=0) else float(balance) - int(withdraw) - 0.50 )

误差

NZEC
Traceback (most recent call last):
File "./prog.py", line 1, in <module>
EOFError: EOF when reading a line

根据这个线程,您需要在点击'运行'时提供自定义输入。测试用例只有在您点击"提交"时才会运行。

https://discuss.codechef.com/t/python-error-while-taking-input/21416

从线程:

如果您试图在IDE模式下运行代码,那么您必须提供自定义输入,否则您将获得NZEC。这是你得到这个错误。如果你想提交,那就提交。所以运行和SUBMIT都是不同的功能。提交时,Codechef给出了测试用例。但在RUN的情况下,你应该给予输入。

最新更新