这个题我是过不去了。。
//============================================================================
// Name : pat.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
using std::cin;
using std::cout;
using std::endl;
int number;
int power;
int main() {
bool first=true;
while(cin>>number&&cin>>power)
{
if(number!=0&&power!=0)
{
if(first)
{
first=false;
}
else
{
cout<<" ";
}
cout<<number*power<<" "<<power-1;
}
else if(power==0)
{
continue;
} else
{
if(first)
{
first=false;
}
else
{
cout<<" ";
}
cout<<"0 0";
}
}
}