#include #include using namespace std; typedef long long LL; int main(int argc, char* argv[]) { LL N,A,B; cin>>N; for (int i=0;i>A>>B; double x=B*log10((double)A); LL Z=(LL)x; double y=pow(10,x-Z); LL X=(LL)y; LL Y=(LL)((y-X)*10); cout<