Result: Accepted
Time: 63ms
Memory: 2132kB
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <string>
#include <ctype.h>
#include <stdlib.h>
#include <iostream>
#include <algorithm>
using namespace std;
const int maxen=100010;
int a[maxen];
int main(){
int n,k;
scanf("%d %d",&n,&k);
for(int i=1;i<=n;++i){
scanf("%d",&a[i]);
}
if(k>=5){
for(int i=1;i<=n;++i){
if(i==1)
printf("100");
else
printf(" 100");
}
printf("\n");
}
else{
while(k--){
for(int i=1;i<=n;++i){
a[i]=10*ceil(sqrt((double)a[i]));
}
}
for(int i=1;i<=n;++i){
if(i==1)
printf("%d",a[i]);
else
printf(" %d",a[i]);
}
printf("\n");
}
return 0;
}