Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int NumP, Aux, i;
- scanf("%d", &NumP);
- int Pec[NumP];
- for(i = 0; i < NumP; i++) Pec[i] = 0;
- for(i = 0; i < (NumP-1); i++) {
- scanf("%d", &Aux);
- Pec[Aux-1] = 1;
- }
- for(i = 0; i < NumP; i++) {
- if(Pec[i] == 0) {
- printf("%d", i+1);
- return 0;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement