#include <iostream>
#include <cstdlib>
using namespace std;
int main(void)
{
int s, d, n;
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> s >> d;
if (s>d && (s+d)%2==0 && (s-d)%2==0)
cout << (s+d)/2 << " " << (s-d)/2<< endl;
else
cout << "impossible"<<endl;
}
system("Pause");
return 0;
}
#include
#include
using namespace std;
int main(void)
{
int s, d, n;
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> s >> d;
if (s>d && (s+d)%2==0 && (s-d)%2==0)
cout << (s+d)/2 << " " << (s-d)/2<< endl;
else
cout << "impossible"<<endl;
}
system("Pause");
return 0;
}
輸入有用while嗎 讓他一直丟測資 有時候會 WA輸出段少