Marks :100
: 0 | : 0
You are given two integer A and B represent a coordinate on the x-axis(0,A) and B represent a coordinate on the y-axis(B,0).
These are two coordinate points on a right-angled triangle, the third point begins the origin(0,0). You will be given N such triangles in the input. Find out and print the length of the hypotenuse of all triangles.
The first line contains integer N denoting the number of triangles. ($$$1 \le N \le 10^4$$$).
The next N line contains two space-separated integers representing A and B respectively($$$1 \le A,B \le 10^9$$$).
Each line represents the length of the hypotenuse of the ith triangle.
3 20 21 8 15 2 3
29 17 4
The formula for the length of hypotenuse = root(a^2+b^2) where a and b represent the length of the other two sides of the triangle.
If the length of the hypotenuse is in the decimal round it is to the next greater integer.
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.