#include<stdio.h> #include<stdlib.h> int main() { int t,k,n,i; int height[20000]; scanf("%d",&t); while(t--) { scanf("%d%d",&k,&n); for(i = 0; < n; i++) scanf("%d",&height[i]); for(i = 0; < n; i++) printf("%d\n",height[i]); } return 0; } for input:
1
3 1
2 5 4
expecting output of
2
5
4
but getting output of
2
please help
in input set t 1, k 3 , n 1. fors perform 1 loop afterwards. '5' , '4' not scanned input.
Comments
Post a Comment