I am new to Leetcode and I really dont know how the system works here. Started with a rather simple problem called Reverse Integer where an input number is given and output reverses the integer and prints it out.
I have written a simple code without using any classes or functions as Im not too comfortable in using them.
'''n = input()
if int(n)<0:
n1=n[1:]
print(-int(n1[::-1]))
elif int(n)>0:
print(int(n[::-1]))
elif int(n)==0:
print(0)'''
It runs fine in my IDE for test cases both positive and negative numbers but I dont know why it doesnt work in here.