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: 59ms
Memory: 1116kB
In contest: 1276

#include<stdio.h>
#include<math.h>

int f(int x)
{
	int res;
	
	if((int)sqrt(x)*(int)sqrt(x)==x)
	    res=(int)sqrt(x);
	else
	    res=(int)sqrt(x)+1;
	
	return(10*res);
}


int main()
{
	int n,k,i,j;
	int a;
	
	scanf("%d %d",&n,&k);
	
	if(k>6)
	{
		for(i=1;i<=n;i++)
		{
			printf("100");
			if(i!=n)
			    printf(" ");
		}
	}
	else
	{
		for(i=1;i<=n;i++)
	    {
	    	scanf("%d",&a);
	    	for(j=1;j<=k;j++)
	    	{
	    		a=f(a);
	    	}
	    	printf("%d",a);
	    	if(i!=n) printf(" ");
    	}
	}
    
	return 0;
}