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: 94ms
Memory: 1896kB
In contest: 1276

#include<stdio.h>
#include<math.h>

double b[100005];

double Q(int x) {
	return 10 * ceil(sqrt(x));
}

int main() {
	int n,k,i;
	double a;

	scanf("%d%d",&n,&k);
	for(i=0;i<n;i++) {
		scanf("%lf",&a);
		for(int j=1;j<=k;j++) {
			a = Q(a);
			if(Q(a) == a) break;
		}
		b[i] = a;
	}
	for(i=0;i<n;i++) {
		if(i<n-1) printf("%.0lf ",b[i]);
		if(i==n-1) printf("%.0lf\n",b[i]);
		
	}
	return 0;
}