Problem:
Solution:
This is the one of the simplest problem I ever had, just implement using the given formulas! However, it does take me some time to write.
Code:
Solution:
This is the one of the simplest problem I ever had, just implement using the given formulas! However, it does take me some time to write.
Code:
using namespace std;
int main(){
long long t;
long long n,m,result;
cin>>t;
for(int i=1;i<=t;i++){
cin>>n>>m;
result = m*(n/2);
cout<<"Case "<<i<<": "<<result<<endl;
}
return 0;
}
No comments:
Post a Comment