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: 54ms
Memory: 2520kB
In contest: 1276

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <deque>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <map>
#include <set>
using namespace std;
int i,j,t,n;
int a[200000];
int main()
{
	int n,k;
	scanf("%d %d",&n,&k);
	for(i=0;i<n;i++)
		scanf("%d",&a[i]);
	if(k>1000)
	{
		for(i=0;i<n-1;i++)
			printf("100 ");
		printf("100\n");
	}
	else
	{
		for(j=1;j<=k;j++)
		{
			for(i=0;i<n;i++)
			{
				t=sqrt(a[i]);
				if(t*t!=a[i])
				t++;
				a[i]=10*t;		
			}
		}
		for(i=0;i<n-1;i++)
			printf("%d ",a[i]);
	
			printf("%d\n",a[n-1]);	
	}
}