Beginner Geometry > Basic Geometry

Dev Skill team likes to test intelligence of internship candidates through various puzzle questions. One of such question was to ask the distance between two opposite corners of a box. A box is considered to be a 3D object and all its sides have 90 degree angle with the opposite plane – that is all sides creates 90 degree corner with its adjacent sides. ![box image][1] Please check the box above. All its corners are marked with letters ‘A’ to ‘H’ and a red line is drawn between ‘A’ and ‘D’. In this problem you need to measure the length of AD. We will provide you 3 lengths AB, BC and CD. You need to measure AD as output. Input: ------ Input starts with an integer **T (≤ 30)**, denoting the number of test cases in first line of input. Each test case will have 3 numbers separated by space in a line of its own, which denotes AB, BC and CD in sequence. All these 3 numbers are greater than zero and less than 1000. Number can be fractional as well but none of them will have more than 2 digits after the decimal place. Output: ------- For each test case, print the length of AD in a line with up to 2 decimal places. Sample Input ------------ 3 1 1 1 1.0 1.0 1.0 3.00 3.00 3.00 Sample Output ------------- 1.73 1.73 5.20 [1]: https://s3-ap-southeast-1.amazonaws.com/devskillimagestorage/questionimages/dacbe9f2-6b16-c1f1-1cb5-08d2e21f106b_cb4b92e720da4a30ae719bff896f94ef_W313xH222.png

MD. Jalal Uddin

Language |
Time Limit (seconds) |

C | 1.00 |

C++ | 1.00 |

C++14 | 1.00 |

C# | 2.00 |

Go | 2.00 |

Java | 2.00 |

JavaScript | 2.00 |

Objective-C | 2.00 |

Perl | 2.00 |

PHP | 2.00 |

Python | 2.00 |

Python3 | 2.00 |

Ruby | 2.00 |

VB.Net | 2.00 |

Solve/Submission

# | User | Language | Timing |
---|---|---|---|

01 | abufarhad | Cpp14 | 0.00s |

02 | joy25896 | Cpp14 | 0.00s |

03 | sharifuls991s | Cpp14 | 0.00s |

04 | MarufAhmed | Cpp14 | 0.00s |

05 | The_Viper | Cpp14 | 0.00s |

06 | Mubeen | Cpp14 | 0.00s |

07 | Mehedi07 | Cpp14 | 0.00s |

08 | Abdullah2222 | Cpp14 | 0.00s |

09 | rafsandevs | Cpp14 | 0.00s |

10 | SaMi_012 | Cpp14 | 0.00s |

11 | ash12 | Cpp14 | 0.00s |

12 | seyedssz | Cpp14 | 0.00s |

13 | Avijeet | Cpp14 | 0.00s |

14 | Light_Yagami407 | Cpp14 | 0.00s |

15 | Tawhidur_Rahman | Cpp14 | 0.00s |

16 | maxhasan | Cpp14 | 0.00s |

17 | MAHRahat | Cpp14 | 0.00s |

18 | gazi93 | Cpp14 | 0.00s |

19 | lazyfahim | Cpp14 | 0.00s |

20 | gulzar | Cpp14 | 0.00s |

21 | creative | Cpp14 | 0.00s |

22 | mahamud_BU | Cpp14 | 0.00s |

23 | jayed_al_hasan | Cpp14 | 0.00s |

24 | Kira | Cpp14 | 0.00s |

25 | Sojal | Cpp14 | 0.00s |

26 | terminator_c | Cpp14 | 0.00s |

27 | ammasum | Cpp14 | 0.00s |

28 | biswajitdas | Cpp14 | 0.00s |

29 | Iqbal1013 | Cpp14 | 0.00s |

30 | tssovi | Cpp14 | 0.00s |

31 | Nurul_CSE | Cpp14 | 0.00s |

32 | rezaul_karim | Cpp14 | 0.00s |

33 | shayekh01 | Cpp14 | 0.00s |

34 | shawon100 | Cpp14 | 0.00s |

35 | sakib_buddy | Cpp14 | 0.00s |

36 | mustakim | Cpp14 | 0.00s |

37 | raja | Cpp14 | 0.00s |

38 | 2apreety18 | Cpp14 | 0.00s |

39 | sadia2427 | Cpp14 | 0.00s |

40 | Khayrul_34 | Cpp14 | 0.00s |

41 | abd007 | Cpp14 | 0.00s |

42 | JubayerSohel | Cpp14 | 0.00s |

43 | Rayhanpatoary | Cpp14 | 0.00s |

44 | mamunparvez | Cpp14 | 0.00s |

45 | Mohimenol_Fahim | Cpp14 | 0.00s |

46 | Nazmul0092 | Cpp14 | 0.00s |

47 | zunayeds | Cpp14 | 0.00s |

48 | Muktar_Hossain | Cpp14 | 0.00s |

49 | non_coder | Cpp14 | 0.00s |

50 | shahad_mahmud | Cpp14 | 0.00s |

Copyright © 2015-2016 Dev Skill.

Feedback
#### Your feedback is our precious!

## Thank you for providing feedback! Our developers will be happy :)

## Sorry there was a problem when submitting the feedback. Please try again. :(