NZEC Error while compiling

My python 3.6 code is working properly on my laptop but it is showing nzec error on code chef.

amount_withdrawn, total_amount= map(int, input().split())

if amount_withdrawn>=total_amount:
    print(float(total_amount))
elif amount_withdrawn%5!=0:
    print(float(total_amount))
else:
    total_amount= float(total_amount)
    total_amount-= amount_withdrawn
    total_amount-= 0.5
    print(total_amount)

If you’re using CodeChef IDE, you’ll have to provide custom input. If you run code without custom input checked it will result in NZEC. It does not load the samples like in leetcode or hackerrank.

Also learn some formatting

2 Likes