题解 | #输出单向链表中倒数第k个结点#
输出单向链表中倒数第k个结点
http://www.nowcoder.com/practice/54404a78aec1435a81150f15f899417d
#include<stdio.h>
int main(){int n=0,val[1001]={0},k=0;
while(scanf("%d",&n)>0){
for(int i=0;i<n;i++)
scanf("%d",&val[i]);
scanf("%d",&k);
printf("%d\n",val[n-k]);
}
}