2 solutions

  • 0
    @ 2025-12-13 11:48:36

    • 0
      @ 2025-6-7 14:17:29
      #include<bits/stdc++.h>
      using namespace std;
      const int N=110;
      int a[N];
      int main()
      {
      	int idx=1;
      	while(1)
      	{
      		int x;
      		cin>>x;
      		a[idx]=x;
      		idx++;
      		if(x==0) break;
      	}
      	for(int i=idx-1;i>=1;i--)
      	{
      		cout<<a[i]<<endl;
      	}
      	return 0;
      }
      
      
      • 1

      Information

      ID
      2370
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      1
      Tags
      (None)
      # Submissions
      26
      Accepted
      20
      Uploaded By