Result: Accepted
Time: 82ms
Memory: 2132kB
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <cstdio>
#include <functional>
#include <fstream>
using namespace std;
const int maxn=1e5+10;
const int inf=0x3f3f3f3f;
typedef long long LL;
int arr[maxn],n,k;
int main()
{
scanf("%d%d",&n,&k);
k=min(10,k);
for(int i=0;i<n;++i)
scanf("%d",&arr[i]);
for(int i=0;i<k;++i){
for(int j=0;j<n;++j)
arr[j]=((int)ceil(sqrt(arr[j]*1.0)))*10;
/*for(int j=0;j<n;++j)
printf("%d%c",arr[j]," \n"[j==n-1]);*/
}
for(int j=0;j<n;++j)
printf("%d%c",arr[j]," \n"[j==n-1]);
}