hdu1046

#include<iostream>
#include<cmath>
using namespace std;

int main()
{
int T,t=0,m,n;

cin>>T;
while(T--)
{
cin>>m>>n;
cout<<"Scenario #"<<++t<<":"<<endl;
if(m&1 && n&1) //两个都是奇数
printf("%.2lf\n\n",m*n-1.0+sqrt(2.0));
else
printf("%.2lf\n\n",(double)m*n);
}
return 0;
}

posted @ 2017-01-16 20:37  王坤1993  阅读(140)  评论(0编辑  收藏  举报