F.cpp 273 B

1234567891011121314
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main(int argc, char const *argv[]) {
  4. int T, n;
  5. for (cin >> T; T-- && cin >> n;) {
  6. double d = fmod(n * log10(n), 1.0);
  7. double t = pow(10, d);
  8. cout << (int) t << endl;
  9. }
  10. return 0;
  11. }