/.......................................................................................................................................................................................................................\
简单的数学题,将y=N^N转换成y=10^(n*log10(n)),再利用科学
计数法,任意一个数都能用x*10^m表示(其中0<x<10的整数)
这里所求的最左边的数就转换成科学计数法x的值。
\......................................................................................................................................................................................................................../
#include<stdio.h>
#include <iostream>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<algorithm>
#include<list>
#include<vector>
#pragma comment(linker,"/STACK:102400000,102400000")
using namespace std;
int main()
{
int t,n;
double x,y,s;
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
x=n*log10(n);
y=x-floor(x);//floor向下取整函数
s=pow(10,y);
printf("%d\n",(int)s);
}
return 0;
}