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

#include<iostream>
#include<iomanip>
#include<string>
#include<vector>
#include<cmath>
#include<cctype>
#include<algorithm>
using namespace std;
int a[100005];
int main(){
	int n, m;
	cin >> n >> m;
	int i, j;
	for(i = 0; i < n; i++) {
		cin >> a[i];
		int x = m;
		if(x >= 5)
			a[i] = 100;
		else{
			while(x--) {
			a[i] = ceil(sqrt(double(a[i]))) * 10;
		}
		}
	}
	for(i = 0; i < n; i++){
		cout << a[i];
		if(i != n - 1)
			cout << " ";
		else 
			cout << endl;
	}
	return 0;

}