Start: Jun, 28, 2019 08:42:00
2019杭州师范大学第一届程序设计竞赛新生赛
End: Jun, 28, 2019 11:42:00
Time elapsed:
Time remaining:

Problem_ID: C
Result: Accepted
Time: 98ms
Memory: 1952kB
In contest: 1276

#include<stdio.h>
#include<string.h>
#include<math.h>
int f(int x){
	return 10*ceil(pow(x,1.0/2));
}
int main(){
	int n,k,j;
	int i,a[100000],b[100000];
	scanf("%d %d",&n,&k);
	for(i=1;i<=n;i++){
		scanf("%d",&a[i]);
		b[i]=a[i];
		for(j=1;j<=k;j++){
			b[i]=f(b[i]);
			if(j>=5)
			break;
			
		}
	}
	for(i=1;i<=n;i++){
		printf("%d",b[i]);
		if(i<n)
		printf(" ");
	}
	return 0;
}