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.
# Enter your code here. Read input from STDIN. Print output to STDOUTtest_cases=int(input())forcinrange(test_cases):# a, b = map(int, input().split())try:case=input().split()a=int(case[0])b=int(case[1])answer=a/bexceptZeroDivisionErrorase:print(f"Error Code: integer division or modulo by zero")exceptValueErrorase:ifnotcase[0].isdigit():print(f"Error Code: invalid literal for int() with base 10: '{case[0]}'")else:print(f"Error Code: invalid literal for int() with base 10: '{case[1]}'")else:print(int(answer))
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 →