//用c语言做的话会很快,主要锻炼一下string的使用 ,但是老提示reverse未声明 
#include <iostream>
#include <string>
#include <string.h>
#include <list>
using namespace std;
int main()
{
    int i,T;
    cin>>T;
    while(T--)
    {
        string s;
        /*
        while(cin>>s)
        {
            if(s=="\n")
            {
                cout<<"\b";
                cout<<endl;
                break;
            }
            reverse(s.begin(),s.end());
            cout<<s<<" ";
        }
        总显示 reverse没有声明 
        */
        cin>>s;
        for(i=s.length()-1;i>=0;i--)
            cout<<s[i];
        if(getchar()!='\n')
            cout<<" ";
        else
            cout<<endl; 
    }
    return 0;
}
        
        

 

相关文章:

  • 2022-01-01
  • 2022-12-23
  • 2021-08-05
  • 2022-01-29
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
猜你喜欢
  • 2021-08-02
  • 2021-10-13
  • 2021-10-18
  • 2021-06-08
  • 2021-06-21
  • 2022-03-06
  • 2021-12-06
相关资源
相似解决方案