Result: Accepted
Time: 56ms
Memory: 2132kB
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<map>
#include<cstdlib>
#include<math.h>
#include<string>
#include<set>
using namespace std;
const int maxn=1e5+50;
const int mod=998244353;
int a[maxn];
int main()
{
int n,k;
scanf("%d %d",&n,&k);
for(int i=0;i<n;i++)
{
int x;
scanf("%d",&x);
if(k>5)
printf("100");
else
{
for(int j=0;j<k;j++)
{
int temp=ceil(sqrt(double(x)));
x=10*temp;
}
printf("%d",x);
}
if(i==n-1) printf("\n");
else printf(" ");
}
return 0;
}