Result: Accepted
Time: 60ms
Memory: 2132kB
#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<map>
#include<cmath>
using namespace std;
#define maxn 100010
#define ll long long
#define mm(a,b) memset(a,b,sizeof(a))
int n,a[maxn];
int main(){
int k;
scanf("%d%d",&n,&k);
for(int i=0;i<n;++i)
{
scanf("%d",&a[i]);
if(k>=10) a[i]=100;
else{
for(int j=0;j<k;++j)
{
a[i]=(int)ceil(sqrt((double)a[i]))*10;
}
}
}
printf("%d",a[0]);
for(int i=1;i<n;++i)
printf(" %d",a[i]);
}