fork download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. int main() {
  6. vector <long long> a;
  7. long long b;
  8. while (cin >> b)
  9. {
  10. a.push_back(b);
  11. }
  12. for (int i = 0; i < a.size()/2; i++)
  13. {
  14. if(a[i] <= 0)
  15. {
  16. a[a.size()/2 + i] *= 10;
  17. }
  18. else
  19. {
  20. a[a.size()/2 + i] = 0;
  21. }
  22. }
  23. for (auto c : a)
  24. {
  25. cout << c << " ";
  26. }
  27. cout << endl;
  28. return 0;
  29. }
Success #stdin #stdout 0s 3460KB
stdin
0 2147483647
stdout
0 21474836470