过不了啊
查看原帖
过不了啊
1563561
liyixin2405221216楼主2024/11/21 18:55
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main() {
	vector<int> arr;
	int n;
	while (n != 0) {
		cin >> n;
		arr.push_back(n);
	}
	//reverse(arr.begin(), arr.end());
	for (int i = arr.size() - 2; i >= 0; i--) {
		cout << arr[i] << " ";
	}
}
2024/11/21 18:55
加载中...