codechef atm 问题中的运行时错误 python
Runtime error in codeshef atm problem python
我为 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
根据此线程,您需要在单击 'run' 时提供自定义输入。当您单击 'submit'.
时,测试用例将只有 运行
https://discuss.codechef.com/t/python-error-while-taking-input/21416
来自线程:
If you are trying to run the code in IDE mode then you must provide
custom input, otherwise you will get NZEC. This is the only reason you
are getting this error. If you wanna submit then just submit. So RUN
and SUBMIT both are different functionalities. In case of SUBMIT,
codechef gives it’s test cases. But in case of RUN, you should give
input.
我为 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
根据此线程,您需要在单击 'run' 时提供自定义输入。当您单击 'submit'.
时,测试用例将只有 运行https://discuss.codechef.com/t/python-error-while-taking-input/21416
来自线程:
If you are trying to run the code in IDE mode then you must provide custom input, otherwise you will get NZEC. This is the only reason you are getting this error. If you wanna submit then just submit. So RUN and SUBMIT both are different functionalities. In case of SUBMIT, codechef gives it’s test cases. But in case of RUN, you should give input.