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: 93ms
Memory: 4084kB
In contest: 1276

#include<bits/stdc++.h>
using namespace std;
const int maxn = 300050;
int n,k;
double a[maxn];
int change(double x,int pos){
	int num;
	for(int i = 1 ; i <= k ; i++){
		num = sqrt(x) + 0.9999999;
		x = num * 10;
		if(x == 100) break;
	}
	return x;
}


int main(){
	cin>>n>>k;
	for(int i = 1 ;  i <= n ; i++){
		scanf("%lf",&a[i]);
		a[i] = change(a[i],i);
	}
	for(int i = 1 ; i <= n ; i++){
		printf("%.0lf",a[i]);
		if(i == n) printf("\n");
		else printf(" ");
	}
	return 0;
}