Result: Accepted
Time: 66ms
Memory: 2012kB
#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
using namespace std;
const int maxn = 1e5+5;
#define mst(a,b) memset(a,b,sizeof a)
#define ll long long
int main() {
int n,k;
int arr[maxn];
scanf("%d%d",&n,&k);
for(int i=0; i<n; ++i)
scanf("%d",&arr[i]);
if(k>=8)
{
for(int i=0; i<n; ++i)
arr[i]=100;
}
else {
for(int i=0; i<k; ++i) {
for(int j=0; j<n; ++j) {
arr[j]=ceil(sqrt(arr[j]));
arr[j]*=10;
}
}
}
printf("%d",arr[0]);
for(int i=1; i<n; ++i) {
printf(" %d",arr[i]);
}
}