All submissions for this problem are available.There is a Forest. Chef is trying to label the trees from $1$ to $N$ but unfortunately chef missed one Number. Chef is busy so help him to find that missing number. ###Input: The first line of input contains an integer $T$ denoting the number of test cases. For each test case first line contains integer $N$. The subsequent line contains $N-1$ numbers (space separated) which are given to trees in any order. ###Output: Print the missing number in array. ###Constraints: - $1 <= T <= 200$ - $1 <= N <= 10^5$ - $1 <= C[i] <= 10^5$ ###Example: Input: 2 5 1 2 3 5 10 10 2 3 4 5 6 7 8 1 Output: 4 9
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, SQL, kotlin, PERL6, TEXT, SCM chicken, PYP3, CLOJ, R, COB, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.