Search found 1 match

by k23456
Fri Sep 20, 2013 8:44 pm
Forum: Volume 108 (10800-10899)
Topic: 10812 - Beat the Spread!
Replies: 35
Views: 24795

Re: 10812 - Beat the Spread!

guys i need help i dnt have any idea what's wrong with my code it works perfectly
#include <iostream>
using namespace std;

int main(){
long int a,b,t;
cin>>t;
while(t--){
cin>>a>>b;
long int s=(a+b)/2,m=(a-b)/2;
if(s>0 && m>0){
cout<<s<<m<<endl;}
else
cout<<"impossible"<<endl;

}
}

after ...

Go to advanced search