Saturday, November 9, 2013

LIGHTOJ1294 - Positive Negative Sign


1294 - Positive Negative Sign

Problem Link:

Solution:


#include < stdio.h >

int main(){
    int t, cases=0;
    long long int a, n, m;
    scanf("%d",&t);
    while(t--){
        scanf("%lld %lld", &n, &m);
        n = n/2;
        m = m*n;
        printf("Case %d: %lld\n",++cases,m);
    }
    return 0;
}

No comments:

Post a Comment