You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
570 B
C++
25 lines
570 B
C++
#include <bits/stdc++.h>
|
|
using namespace std;
|
|
int main()
|
|
{
|
|
int T;
|
|
scanf("%d", &T);
|
|
for (int i = 1; i <= T; ++i)
|
|
{
|
|
printf("Case #%d: ", i);
|
|
double x, y;
|
|
scanf("%lf%lf", &x, &y);
|
|
int a = x * 100 + 0.5;
|
|
int b = y * 100 + 0.5;
|
|
if (b == 1 || b == 10 || b == 100 || b == 1000 || b == 10000)
|
|
{
|
|
if (a == 2 * b)
|
|
printf("0.01\n");
|
|
else
|
|
printf("0.02\n");
|
|
}
|
|
else
|
|
printf("0.01\n");
|
|
}
|
|
return 0;
|
|
} |