Untitled
Anonymous
plain_text
10/17/2026 6:53 PM
720 B
5
Indexable
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define PI 3.14
using namespace std;
void testCase()
{
string word;
cin>>word;
stack <char> s;
for(int i=0;i<word.size();i++){
s.push(word[i]);
}
while(!s.empty()){
cout<<s.top()<<endl;
s.pop();
}
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t=1;
//cin>>t;
while(t--){
testCase();
}
return 0;
}
Editor is loading...
Leave a Comment