Programming Challenge in HackerRank

  • You are given two values  and . 
  • Perform integer division and print .
Input Format
  • The first line contains , the number of test cases. 
  • The next  lines each contain the space separated values of  and .
  • 0 < T < 10
Output Format
  1. Print the value of . 
  2. In the case of ZeroDivisionError or ValueError, print the error code.
num_of_cases = input()
for i in range(0,int(num_of_cases)):
a, b = map(int, input().split())
except (ZeroDivisionError, ValueError) as e:
print("Error Code:", e)


One thought on “Programming Challenge in HackerRank”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: