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

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
#define ll long long
const int maxn=100010;
int a[maxn];
int f(int x)
{
	int t=10*(int)(sqrt(x)+0.99);
	return t;
}
int main ()
{
	int x,y;
	cin>>x>>y;
	for(int i=0;i<x;i++)
	{
		cin>>a[i];
	}
	if(y>=5)
	{
		for(int i=0;i<x;i++)
		{
			printf("100");
			if(i!=x-1)printf(" ");
		}
	}
	else
	{
	
	for(int i=0;i<x;i++)
	{
		for(int j=0;j<y;j++)
		{
			a[i]=f(a[i]);
		}
		if(i!=x-1)printf("%d ",a[i]);
		else printf("%d",a[i]);
	}
}
}