HTML & JS
#include<iostream>

using namespace std;

int main() { 
    int number,size,b[999],d[999],a,c,e;
    cin>>number; 
    for(int i=0;i<number;i++)
    { cin>>size;
    for( a=1;a<=(size-1);a++)
    {cin>>b[a];

    }
    for( c=1;c<=size;c++){
        d[c]=c;

        }
        for(e=1;e<=size;e++){
            if(d[e]!=b[e]){
                cout<<d[e]<< endl;
                break;
            }
        }
    }
//code
return 0;
}

Generated URL:

Output:

4
9
Report Bug