每日一题洛谷P1427 小鱼的数字游戏c++
#include<iostream>
using namespace std;
int main() {
long long s[100] = { 0 };
int i = 0;
while (1) {
cin >> s[i];
if (s[i]==0) {
break;
}
i++;
}
for (i; i >= 0;i--) {
if(s[i]!=0)
cout << s[i] << " ";
}
return 0;
}