fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. //code
  5. int t,n,c[1000],count,i,j,k;
  6. for(i=1;i<=t;i++)
  7. {
  8. count = 1;
  9. scanf("%d",&n);
  10. for(j=0;j<n-1;j++)
  11. {
  12. scanf("%d",&c[j]);
  13. }
  14. for(k=0;k<n-1;k++)
  15. {
  16. if(c[k]!=count)
  17. {
  18. printf("%d",c[k]);
  19. break;
  20. }
  21. count++;
  22. }
  23. }
  24. return 0;
  25. }
Success #stdin #stdout 0s 9296KB
stdin
2
5
1 2 3 5
10
1 2 3 4 5 6 7 8 10
stdout
Standard output is empty