#include #include using namespace std; int main(){ int N; double A,B; cin>>N; while(N--){ cin>>A>>B; double a=log10((double)A)*B; int b=a; int c=pow(10.0,(a-b))*100000000; while(c/100!=0) c/=10; cout<