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

#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<string.h>
using namespace std;
typedef long long LL;
int a[100005];
int main()
{
	
	int n,k;
	scanf("%d%d",&n,&k);
	for(int i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		for(int j=1;j<=k;j++)
		{
			int num=ceil(sqrt(a[i]*1.0))*10;
			if(a[i]==num)break;
			else
			{
				a[i]=num;
			}
		}
	}
	for(int i=1;i<=n;i++)
	{
		printf("%d",a[i]);
		if(i!=n)
		{
			printf(" ");
		}
	}
	printf("\n");
	return 0;
}