3 条题解

  • 0
    @ 2025-10-16 21:18:00
    #include<stdio.h>
    
    int main(){
    	int n,m;
    	
    	scanf("%d %d",&n,&m);
    	
        int tot[101];
        
        int i;
        
        for(i=0;i<n;i++){
        	scanf("%d",&tot[i]);
    	}
    	int j,k;
    	for(i=0;i<m;i++){
    		for(j=n-1;j>=0;j--){
    			tot[j+1]=tot[j];
    		}
    		tot[0]=tot[n];
    	}
    	
    	for(i=0;i<n;i++){
    		printf("%d",tot[i]);
    		if(i!=n-1){
    			printf(" ");
    		}
    	}
    	
    	return 0;
    	
    }
    

    信息

    ID
    24
    时间
    1000ms
    内存
    512MiB
    难度
    4
    标签
    递交数
    291
    已通过
    137
    上传者