fork download
  1. #include<iostream>
  2. #include<bits/stdc++.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int t;
  9. cin>>t;
  10. while(t--)
  11. {
  12.  
  13. int a; int b;
  14. cin>>a>>b;
  15. cout<<fixed;
  16. cout<<setprecision(2)<<(double)sqrt(pow(a,2)+pow(b,2))<<endl;
  17.  
  18. }
  19.  
  20.  
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 15232KB
stdin
2
3 4
6 8

stdout
5.00
10.00