fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // Номер мобильного телефона
  6. int c, count = 0;
  7. int n[] = {0,0,0,0,0,0,0,0,0,0};
  8. while ((c = cin.get()) != EOF) {
  9. n[c - 48]++;
  10. }
  11. for (int i = 0; i < 10; i++) {
  12. if (n[i] == 0) count++;
  13. }
  14. cout << count << "\n";
  15. for (int i = 0; i < 10; i++) {
  16. if (n[i] == 0) cout << i << " ";
  17. }
  18. return 0;
  19. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
10
0 1 2 3 4 5 6 7 8 9