We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
T=int(input())ifTinrange(0,10):p=[(input())foriinrange(T)]for_inp:try:result=int(_[0])//int(_[-1]) exceptZeroDivisionError:print("Error Code: integer division or modulo by zero")exceptValueError:if_[0].isdigit():s=_[-1]else:s=_[0]print("Error Code: invalid literal for int() with base 10: '{}'".format(s))else:print(result)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Exceptions
You are viewing a single comment's thread. Return to all comments →