Fisa Flood (UVA 13052) by beet1333
Contest: 3738    RunID: 20174060    Status: Accepted    Date: Sat Oct 14 15:09:25 JST 2017


#include<bits/stdc++.h>

using namespace std;

using int64 = long long;

struct BeetAizu
{

  BeetAizu()
  {
  }

  void run()
  {
    int A, B;
    cin >> A >> B;
    if(A == 0 && B == 0) puts("0.000 0.000");
    else if(B % 2 == 0) puts("1.000 0.000");
    else puts("0.000 1.000");
  }
};

int main()
{
  BeetAizu beet;
  int T;
  cin >> T;
  for(int i = 1; i <= T; i++) {
    cout << "Case " << i << ": ";
    beet.run();
  }
}