{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"若res \u003d a\u003csup\u003en\u003c/sup\u003e,给定整数a和n,相信大家都会用快速幂求res。\u003cbr\u003e\n今天,让我们把问题反过来,给定n和res,要怎么求这个整数a呢?"}},{"title":"Input","value":{"format":"HTML","content":"多实例输入,每行两个整数n和res (1\u003c\u003dn\u003c\u003d200, 1\u003c\u003dres\u003c\u003d10\u003csup\u003e101\u003c/sup\u003e)"}},{"title":"Output","value":{"format":"HTML","content":"对于每组测试数据,输出满足题意的a (a\u003csup\u003en\u003c/sup\u003e \u003d res,1\u003c\u003da\u003c\u003d1e9)"}},{"title":"Sample Input","value":{"format":"HTML","content":"3 8 \u003cbr\u003e\n5 3125 \u003cbr\u003e\n2 36 \u003cbr\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"2 \u003cbr\u003e\n5 \u003cbr\u003e\n6 \u003cbr\u003e"}}]}