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: 67ms
Memory: 1984kB
In contest: 1276

#include<iostream>
#include<string>
#include<cmath>
using namespace std;
int f(int n){
   	if(n==1)
		return 10;
	else if(n<=4)
		return 20;
	else if(n<=9)
		return 30;
	else if(n<=16)
		return 40;
	else if(n<=25)
		return 50;
	else if(n<=36)
		return 60;
	else if(n<=49)
		return 70;
	else if(n<=64)
		return 80;
	else if(n<=81)
		return 90;
	else if(n<=100)
		return 100;
}
int main(){
	int a[100002];
	int T,s=0,t;
	scanf("%d %d",&T,&t);
	for(int i=0;i<T;++i){
		cin>>a[i];
	}
	if(t>=6){
		for(int i=0;i<T;++i){
			a[i]=100;
		}
	}
	else{

		for(int j=1;j<=t;++j){
		 for(int i=0;i<T;++i){
		    a[i]=f(a[i]);
		}
				
	}
	}
	for(int i=0;i<T;++i){
		if(i==T-1)
	printf("%d",a[i]);
	    else
	printf("%d ",a[i]);
	}
	return 0;	        
}