#include
#include
using namespace std;
int main()
{
int b,m,tmp; //tmp表示指数
while(cin>>b>>tmp>>m)
{
int base = 0, top = 0, node[100], a = 1;
while(tmp)
{
node[top++] = tmp%2;
tmp = tmp/2;
}
while(base
计算结果: