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: 71ms
Memory: 2132kB
In contest: 1276

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define N 100010

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

int n, k;
int arr[N];

int main() {
	scanf("%d %d", &n, &k);
	for (int i = 1; i <= n; ++i) {
		scanf("%d", arr + i);
	}
	for (int i = 1; i <= n; ++i) {
		int cnt = k;
		while(cnt > 0 && arr[i] != 100) {
			arr[i] = f(arr[i]);
			cnt--;
		}
	}
	for (int i = 1; i <= n; ++i) {
		printf("%d%c", arr[i], " \n"[i == n]);
	}
 	return 0;
}