A.cpp 294 B

12345678910111213141516
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int n;
  5. std::vector<int> v;
  6. while(cin >> n && n){
  7. v.push_back(n);
  8. }
  9. reverse(v.begin(), v.end());
  10. for(int i = 0; i < v.size(); i++){
  11. cout << v[i] << ' ';
  12. }
  13. cout << endl;
  14. return 0;
  15. }