Thursday, April 28, 2016

1294 - Positive Negative Sign

Problem Linkhttp://www.lightoj.com/volume_showproblem.php?problem=1294

Solve :

#include<bits/stdc++.h>

using namespace std;

int main()
{

    long long int n,m,j=1,t;
    scanf("%lld",&t);

    while(t--)
    {
        scanf("%lld%lld",&n,&m);

        n=n/2;
        n=n*m;
        printf("Case %lld: %lld\n",j,n);
        j++;

    }

}

No comments:

Post a Comment