Python — Exit code is 1

Revision en1, by petoor, 2017-08-21 10:18:17

Hey guys.

I am new to submitting in python, my code is as follows:

n = int(input()) k = int(input())

if(divmod(n,2)[1]==0): stop_odd = n/2 else: stop_odd= n/2+1 if(k<stop_odd): answer = k*2-1 else: k = k-stop_odd answer = k*2 if(k==0): answer=n-1

print(int(answer))

It is for the problem 318A — Even Odds.

Can anyone tell me why i see the exit code, as the code seems to compile and run in my own editor.

Thanks.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English petoor 2017-08-21 10:18:17 486 Initial revision (published)