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: 66ms
Memory: 1388kB
In contest: 1276

#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
int k(double x)
{
	double result;
	result=10*ceil(sqrt(x));
	return (int)result;
}
int main(void)
{
	int b[100000],n,cishu,i,j;
	scanf("%d%d",&n,&cishu);
	for(i=0;i<n;++i)
	{
		scanf("%d",&b[i]);
	}
	
	if(cishu>=10)
	{
		for(i=0;i<n;++i)
			{
				printf("100 ");
			}
	}
	else
		{
				for(j=0;j<n;++j)
			{
				for(i=1;i<=cishu;++i)
					{
						b[j]=k((double)b[j]);
					}
			}
		
	for(i=0;i<n;++i)
	{
		printf("%d ",b[i]);
	}
	}
	return 0;
}