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

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <string>
#include <ctype.h>
#include <stdlib.h>
#include <iostream>
#include <algorithm>
using namespace std;
const int maxen=100010;
int a[maxen];
int main(){
	int n,k;
	scanf("%d %d",&n,&k);
	for(int i=1;i<=n;++i){
		scanf("%d",&a[i]);
	}
	if(k>=5){
		for(int i=1;i<=n;++i){
			if(i==1)
			printf("100");
			else
			printf(" 100");
		}
		printf("\n");
	}
	else{
		while(k--){
			for(int i=1;i<=n;++i){
			a[i]=10*ceil(sqrt((double)a[i]));
		}
		}
	for(int i=1;i<=n;++i){
		if(i==1)
		printf("%d",a[i]);
		else
		printf(" %d",a[i]);
	}
	printf("\n");
}
	return 0;
}