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: 207ms
Memory: 2524kB
In contest: 1276

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<queue>
#include<list>
#include<math.h>
#include<vector>
#include<stack>
#include<string>
#include<set>
#include<map>
#include<numeric>
#include<stdio.h>
#include<functional>
#include<time.h>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int maxn = 1e5 + 10;
const ull mode = 10092272478850909;
const int inf = 0x3f3f3f3f;
const double pi = 3.14159265358979323846264338327950;
template <class T> inline T min(T a, T b, T c) { return min(min(a, b), c); }
template <class T> inline T max(T a, T b, T c) { return max(max(a, b), c); }
template <class T> inline T min(T a, T b, T c, T d) { return min(min(a, b), min(c, d)); }
template <class T> inline T max(T a, T b, T c, T d) { return max(max(a, b), max(c, d)); }

ll ans[111];
ll a[maxn];

ll solve(ll k)
{
	ll now=sqrt(k*1.0);
	if(now*now==k) return now*10;
	else return (now+1)*10;
}

int main()
{
	ll n,t;
	cin>>n>>t;
	for(int i=0;i<n;i++)
		cin>>a[i];
	for(int i=0;i<111;i++)
		ans[i]=i;
	for(int i=0;i<t;i++)
		for(int i=0;i<111;i++)
			ans[i]=solve(ans[i]);

	for(int i=0;i<n;i++)
	{
		if(i==0) cout<<ans[a[0]];
		else cout<<' '<<ans[a[i]];
	}
	cout<<endl;
    
	return 0;
}