9 条题解

  • 3

    笑点解析,reverse

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	string str;
    	cin>>str;
    	reverse(str.begin(),str.end());
    	cout<<str;
    	return 0;
    }
    
    • 3

      char 少走 INT_MAX 年弯路。

      code

      #include<bits/stdc++.h>
      using namespace std;
      int main(){
      	char a,b,c,d;
      	cin>>a>>b>>c>>d;
      	cout<<d<<c<<b<<a;
      	return 0;
      }
      
      • 1
        @ 2024-11-7 13:03:18

        #include<bits/stdc++.h> using namespace std; int main() { string w; cin>>w; reverse(w.begin(),w.end()); cout<<w; return 0; }

        • 0
          @ 2024-9-29 21:36:15
          #include<bits/stdc++.h>
          using namespace std;
          int main()
          {
           char a[5];
           for(int i=0;i<5;i++)
           {
            a[i]=cin.get();
           }
            for(int i=4;i>=0;i--)
           {
            cout<<a[i];
           }
           return 0;
          }
          
          • 0
            @ 2023-12-25 13:13:14

            如绞尽脑汁写代码的呕吐感 #include<bits/stdc++.h> using namespace std; int main() { int w,s,a,b,c,d; cin>>w; a=w/1000; b=w/100%10; c=w/10%10; d=w%10; s=d1000+c100+b*10+a; cout<<s; return 0; }

            image

            • 0
              @ 2023-12-25 12:57:49

              #include<bits/stdc++.h> using namespace std; int main(){ int w,a,b,c,d; cin>>w; a=w/1000; b=w%1000/100; c=w%100/10; d=w%10; cout<<d<<c<<b<<a<<endl; return 0; }

              • 0
                @ 2023-12-23 13:32:15

                #include<iostream> using namespace std; int main() { int w,b,c,d,e,ans=0; cin>>w; b=w/100/10; c=w/100%10; d=w%100/10; e=w%10; if(e0,d0)cout<<c<<b; else cout<<e<<d<<c<<b; return 0; }

                • 0
                  @ 2023-12-23 13:23:18

                  #include<bits/stdc++.h> using namespace std; int main() { int w,b,c,d,e; cin>>w; b=w/1000; c=(w%1000)/100; d=(w%100)/10; e=w%10; if(e0,d0) cout<<c<<b; else cout<<e<<d<<c<<b;

                  return 0;
                  

                  }

                  • -1

                    用char不是更快吗 #include<bits/stdc++.h> using namespace std; int main() { char a,b,c,d; cin>>a>>b>>c>>d; cout<<d<<c<<b<<a<<endl; return 0; }

                    • 1

                    信息

                    ID
                    17
                    时间
                    1000ms
                    内存
                    256MiB
                    难度
                    1
                    标签
                    递交数
                    180
                    已通过
                    120
                    上传者