#include #include using namespace std; int main() { int n; cin>>n; while (n--) { double a, b, x, y, z; cin>>a>>b; auto t=pow(10.0, modf(log10(a)*b, &z)); while (t>10) { t*=0.1; ++z; } while (t<1) { t*=10; --z; } y=modf(t, &x); cout<