PersonalCorpus 版 (精华区)

41703 2002-10-15 02:57:01 Accepted
1037 C++ 00:00.04 384K Big Guava

int main()
{
#ifndef ONLINE_JUDGE
    freopen("c:\\0acm\\zju\\i1037","r",stdin);
    freopen("c:\\0acm\\zju\\o1037","w",stdout);
#endif

    int n,t,a,b;
    double res;
    
    scanf("%d\n",&n);
    for (t=1;t<=n;t++) {
        scanf("%d%d\n",&a,&b);
        res=a*b;
        if ((a%2==1)&&(b%2==1)) res+=0.41421356237309504880;
        printf("Scenario #%d:\n",t);
        printf("%.2lf\n\n",res);
    }
}
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.259毫秒