Result: Accepted
Time: 66ms
Memory: 2132kB
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <algorithm>
#include <iostream>
#define clr(a,b) memset(a,b,sizeof(a))
#define ll long long
using namespace std;
const int maxn=1e5+10;
int n,k;
int a[maxn];
int get(int x)
{
return 10*(int)ceil(sqrt(x*1.0));
}
int main()
{
scanf("%d %d",&n,&k);
for(int i=0;i<n;i++)
{
scanf("%d",&a[i]);
for(int j=0;j<k;j++)
{
a[i]=get(a[i]);
if(a[i]==100)break;
}
}
int k=0;
for(int i=0;i<n;i++)
{
if(k)printf(" ");
printf("%d",a[i]);
k=1;
}
puts("");
}