I’ve been trying to do a problem on leetcode(29) and i submit my answer but it gives me this error. Here’s the code:
class Solution(object):
def divide(self, dividend, divisor):
"""
:type dividend: int
:type divisor: int
:rtype: int
"""
dividend = input()
divisor = input()
if -2^31 <= dividend and divisor != None and divisor<= 2^31 - 1:
result = dividend/divisor
else:
print("Invalid")
exit()
print(result)
It should give me the int of the division.