initial_bal = int( input("enter initial balance"))
withdraw_money = int( input("enter balance to withdraw"))
f = 0
if withdraw_money % 5 == 0 :
if ( withdraw_money + 0.5 ) <= initial_bal:
f = 1
if f == 1:
account_bal = initial_bal - ( withdraw_money + 0.5 )
print ("remaining balance : " , account_bal)
else :
print(initial_bal)
当我把上面写的代码提交给codechef时,它抛出了运行时错误(NZEC)。在我的机器上工作正常。 谁能告诉我,我的代码错误在哪里?在
首先,你不必打印“输入初始余额”之类的东西。你只需要打印测试用例中给出的内容。只需打印测试用例中给出的内容即可。。没别的。。。
这是python中的实际代码
相关问题 更多 >
编程相关推荐