Q: HS08TEST Problem - CodeChef
my code:
c,b = map(float,input().split())
if (c<b) and (c%5==0):
print(“%.2f” %((b-c)-0.50))
else:
print(“%.2f” %b)
It’s working in my IDE but when I submit, it’s showing NZEC.
Q: HS08TEST Problem - CodeChef
my code:
c,b = map(float,input().split())
if (c<b) and (c%5==0):
print(“%.2f” %((b-c)-0.50))
else:
print(“%.2f” %b)
It’s working in my IDE but when I submit, it’s showing NZEC.
you are only checking c<b but in actual you should check (c+0.5)<b because the transaction charge would also be deducted from the account.
corrected solution
true! but the error still persist… Nzec… Traceback (most recent call last):
File “./prog.py”, line 1, in
EOFError: EOF when reading a line
EOF means, you are not providing any input. Just give some input in the codechef ide
Thanks! Custom input and then submitting it works!