样例是对的??全WA
查看原帖
样例是对的??全WA
767417
Serendi_Pity楼主2022/10/16 17:04
#include<bits/stdc++.h>
using namespace std;
int main(){
    int a[105],i=1;
    for(;;i++){
    	if(a[i-1]==0){
            break;
        }else{
        	cin>>a[i];
		}
    }
    for(int j=i;j>0;j--){
        if(a[j]==0){
		}else{
			cout<<a[j]<<" ";
		}
    }
}
2022/10/16 17:04
加载中...