fork download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7. int n;
  8. cin >> n;
  9.  
  10. vector<int> ted(n);
  11.  
  12. for(int i =0; i <n ; i++){
  13. cin >> ted[i];
  14. }
  15.  
  16. cout << n<< endl;
  17.  
  18. for(int i =0 ;i <n ; i++){
  19. cout << ted[i] + 1 << " ";
  20. }
  21.  
  22.  
  23.  
  24. return 0;
  25. }
Success #stdin #stdout 0s 5324KB
stdin
1
1000000
stdout
1
1000001