Result: Accepted
Time: 62ms
Memory: 2520kB
#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<stdlib.h>
#include<string.h>
#include<math.h>
using namespace std;
typedef long long ll;
const int MAXN=1e5+6;
ll a[MAXN];
int main()
{
int n,k;
scanf("%d%d",&n,&k);
for(int i=0;i<n;i++)
scanf("%d",&a[i]);
for(int i=0;i<n;i++)
{
for(int j=0;j<k;j++)
{
double tmp=sqrt(double(a[i]));
a[i]=ceil(tmp)*10;
if(a[i]==100)
break;
}
if(i!=n-1)
printf("%d ",a[i]);
else
printf("%d\n",a[i]);
}
//system("pause");
return 0;
}