Gift Box (UVA 13053) by ynu_a
Contest: 3738    RunID: 20173938    Status: Accepted    Date: Sat Oct 14 14:48:25 JST 2017


#include<bits/stdc++.h>
using namespace std;

#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define SORT(c) sort((c).begin(),(c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX

typedef long long ll;
typedef pair<int, int> ii;

int main(){

  int t;
  cin >> t;
  rep(n, t){
    double l, w, h;
    cin >> l >> w >> h;
    double ans = 2*sqrt((l+h)*(l+h) + (w+h)*(w+h));
    printf("Case %d: %.4lf", n+1, ans);
  }

  return 0;
}