Result: Accepted
Time: 302ms
Memory: 2404kB
#include<cstdio>
#include<algorithm>
#include<string>
#include<cstring>
#include<cmath>
#include<iostream>
#include<set>
#include<stdlib.h>
#include<vector>
using namespace std;
const int maxn=1e5+10;
const int inf=0x3f3f3f3f;
int main(){
int n,k;
scanf("%d%d\n",&n,&k);
double a[maxn];
for(int i=1;i<=n;i++){
scanf("%lf",&a[i]);
if(k>100)k=100;
int t=k;
while(t--){
a[i]=10*ceil(sqrt(a[i]));
}
}
for(int i=1;i<=n;i++){
printf("%.0f ",a[i]);
}
printf("\n");
}