对于
对他取对数
可以得到
则x是我们要求得数字,
那么我们只需要求就可以了
#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;
int main()
{
//freopen("in.txt","r",stdin);
int T,N,ans;
scanf("%d",&T);
while(T--){
scanf("%d",&N);
double logM=N*log10(N);
double deci=logM-floor(logM);
printf("%d\n",(int)pow(10.0,deci));
}
return 0;
}