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

#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <cstdio>
#include <functional>
#include <fstream>
using namespace std;
const int maxn=1e5+10;
const int inf=0x3f3f3f3f;
typedef long long LL;
int arr[maxn],n,k;
int main()
{
	scanf("%d%d",&n,&k);
	k=min(10,k);
	for(int i=0;i<n;++i)
		scanf("%d",&arr[i]);
	for(int i=0;i<k;++i){
		for(int j=0;j<n;++j)
			arr[j]=((int)ceil(sqrt(arr[j]*1.0)))*10;
		/*for(int j=0;j<n;++j)
			printf("%d%c",arr[j]," \n"[j==n-1]);*/
	}
	for(int j=0;j<n;++j)
			printf("%d%c",arr[j]," \n"[j==n-1]);
}