Fisa Flood (UVA 13052) by ynu_a
Contest: 3738    RunID: 20175464    Status: Accepted    Date: Sat Oct 14 19:23:06 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){

    int a, b;
    cin >> a >> b;
    if(a == 0 && b == 0) cout << "Case " << n+1 << ": 0.000 0.000" << endl;
    else if(b % 2 == 0) cout << "Case " << n+1 << ": 1.000 0.000" << endl;
    else cout << "Case " << n+1 << ": 0.000 1.000" << endl;
  }

  return 0;
}