import sys
n = int(raw_input())
for i in range(1, n+1) :
num = sys.stdin.readline()
an = num.split()
a = int(an[0])
b = int(an[1])
if(a%2) and (b%2) :
sum = a * b + 0.41
else :
sum = a * b
print 'Scenario #%d:' % i
print "%.2f\n" % sum
#include <iostream>
#include <cstdio>
using namespace std;
int n, m;
int main() {
int T;
cin >> T;
for(int i = 1; i <= T; i++) {
cin >> n >> m;
cout << "Scenario #" << i << ':' << endl;
if(((n*m) & 1) == 0) {
printf("%.2f\n", double(n * m));
}
else {
printf("%.2f\n", 0.41 + n * m);
}
printf("\n");
}
return 0;
}
每天用一点时间去学一点新东西,淡定从容。在光束的路径上,进行长途的旅行,是不能着急的。