用数组倒序输出就行了。
#include<stdio.h>
#include<stdlib.h>
int main(){
int n;
while(scanf("%d",&n)!=EOF){
long* a=(long*)malloc(sizeof(long)*n);
for(int i=0;i<n;i++){
scanf("%d",&a[i]);
}
for(int i=n-1;i>=0;i--){
printf("%d ",a[i]);
}
}
return 0;
}
结果:
标签:int,Transposition,Zero,long,KY109,complexity,include From: https://www.cnblogs.com/llllmz/p/17972493