Light OJ Solution 1294 - Positive Negative Sign
Solve in C:
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int i,a,r,n,m;
scanf("%d",&a);
for(i=1;i<=a;i++)
{
scanf("%lld%lld",&n,&m);
r=(n*m)/2;
printf("Case %lld: %lld\n",i,r);;
}
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int i,a,r,n,m;
scanf("%d",&a);
for(i=1;i<=a;i++)
{
scanf("%lld%lld",&n,&m);
r=(n*m)/2;
printf("Case %lld: %lld\n",i,r);;
}
}
No comments