fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int N;
  6. cin >> N;
  7. int arr[N+1]={};
  8. int K;
  9. while(cin >>K){
  10. arr[K]=1;
  11. }
  12. for(int i=N;i>=1;i--){
  13. if(arr[i]==0){
  14. cout << "No. " << i << '\n';
  15. }
  16. }
  17. }
Success #stdin #stdout 0s 5288KB
stdin
5
3 4 5
stdout
No. 2
No. 1