Result: Accepted
Time: 86ms
Memory: 2788kB
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<string.h>
#include<string>
#include<iostream>
#include<algorithm>
#include<string>
#include<stdlib.h>
const int p=0x3f3f3f3f;
#define maxn 100005
int a[maxn],b[maxn];
int n,m,k,x,y,l,r;
char s[maxn];
int main()
{
while(~scanf("%d%d",&n,&m))
{
for(int i=0;i<n;i++)
{
scanf("%d",&a[i]);
for(int j=0;j<m;j++)
{
if(a[i]==100)
break;
a[i]=10*ceil(pow(a[i],0.5));
}
}
for(int i=0;i<n;i++)
i==n-1?printf("%d\n",a[i]):printf("%d ",a[i]);
}
}