Sunday, November 10, 2013

LIGHTOJ1000 - Greetings from LightOJ



Get paid to share your links!
1000 - Greetings from LightOJ


Solution:

#include < iostream >

using namespace std;

int main(){
    int a,b,sum,t,cases=0;
    cin>>t;
    while(t--){
        cin>>a>>b;
        cout<< "Case " << ++cases << ": " << a+b << endl;
    }
}


Problem & Solution Download

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;
}