void main(){
int arr1[10000];
int t,n,i,zh,num=1,m;
scanf("%d %d",&n,&m);
for(t=0;t<n;t++){
scanf("%d",&arr1[t]);
}
for(t=0;t<n;t++){
for(i=0;i<(n-1-t);i++){
if(arr1[i]>arr1[i+1]){
zh=arr1[i];
arr1[i]=arr1[i+1];
arr1[i+1]=zh;
}
}
}
for(t=n-m;t<n;t++){
num*=arr1[t];
}
printf("%d\n",num);
}
```c
```c
在这里插入代码片