#include<bits/stdc++.h>
using namespace std;
main()
{
long n;
cin>>n;
while(n--)
{
char ch;
long long a,b,ans;
cin>>ch>>a>>b;
if(ch=='r'||ch=='Q')
{
cout<<min(a,b)<<endl;
}
else if(ch=='k')
{
ans=(a*b)/2;
cout<<ans<<endl;
}
else
{
ans=(((a+1)/2)*((b+1)/2));
cout<<ans<<endl;
}
}
}
using namespace std;
main()
{
long n;
cin>>n;
while(n--)
{
char ch;
long long a,b,ans;
cin>>ch>>a>>b;
if(ch=='r'||ch=='Q')
{
cout<<min(a,b)<<endl;
}
else if(ch=='k')
{
ans=(a*b)/2;
cout<<ans<<endl;
}
else
{
ans=(((a+1)/2)*((b+1)/2));
cout<<ans<<endl;
}
}
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন