26 条题解

  • 1
    @ 2025-5-5 16:19:57
    #include<bits/stdc++.h>
    using namespace std;
    char a[1000000];
    int main(){
    	cin>>a;
    	for(int i=strlen(a)-1;i>=0;i--){
    		cout<<a[i];
    	}
    } 
    
    
    • 1
      @ 2025-3-29 18:22:52
      #include <bits/stdc++.h>
      using namespace std;
      
      int main()
      {
          string n;
          cin >> n;
          cout << n[2] << n[1] << n[0] << endl;
          return 0;
      }
      
      • 1
        @ 2023-8-7 16:36:28
        #include<bits/stdc++.h>
        #include<cstring>
        #include<queue>
        #include<set>
        #include<stack>
        #include<vector>
        #define ll long long
        using namespace std;
        const int N=1e5+10;
        const int M=2023;
        const int inf=0x3f3f3f3f;
        int n,m,k;
        void dfs(int n)
        {
        	if(n<=0)return;
        	cout<<n%10;
        	dfs(n/10);
        }
        int main()
        {
        	cin>>n;
        	dfs(n);
        	return 0;
        }
        
        • 1
          @ 2023-6-4 10:45:41
          #include<iostream>
          using namespace std;
          //#define LL long long
          //const int N = 1e6 + 10;
          //const int INF = 0x3f3f3f3f;
          //int a[10][10];
          int a;
          int main(){
          	cin>>a;
          	while(a){
          		cout<<a%10;
          		a/=10;
          	}
          }
          
          • 1
            @ 2023-5-11 21:17:02
            #include 
            using namespace std;
            int main() 
            {
                string n;
                getline(cin, n);
                for (int i = n.size() - 1; i >= 0; i--) 
            	{
                    cout << n[i];
                }
                return 0;
            }
            

            这题很简单,建议用字符串做,不然那个“0”会很麻烦(>ω・* )ノ

            • 1
              @ 2023-1-23 14:58:00
              #include<iostream>
              using namespace std;
              int main(){
              	string a;
              	cin>>a;
              	for(int i = a.size()-1; i >= 0; i -- ){
              		cout<<a[i];
              	}
              	return 0;
              }
              
              
              
              • 1
                @ 2022-9-29 21:24:07

                #include<stdio.h> #include using namespace std; int main() { char a,b,c; cin >>a >>b >>c; cout<< c<< b<< a;

                }

                • 0
                  @ 2025-3-16 18:19:04
                  #include <stdio.h>
                  #include <iostream>
                  using namespace std;
                  int main()
                  {
                  	int n;
                  	cin >> n;
                  	int a,b,c;
                  	c = n % 10;
                  	a = n / 100;
                  	b = n / 10 % 10;
                  	cout << c << b << a << endl;
                  }
                  
                  • 0
                    @ 2025-3-14 22:41:40

                    #include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; int b = a % 10; int c = a-b; int c2 = c % 100; int d = a - c2 - b; int d2 = d / 100; int b2 = b * 100; int e = b2 + c2 + d2; cout << e; return 0; }

                    • 0
                      @ 2025-3-14 22:40:56

                      #include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; int b = a % 10; int c = a-b; int c2 = c % 100; int d = a - c2 - b; int d2 = d / 100; int b2 = b * 100; int e = b2 + c2 + d2; cout << e; return 0; }

                      • 0
                        @ 2024-10-20 20:04:32

                        递归:

                        #include<cstdio>
                        #include<iostream>
                        #include<cstring>
                        #include<cmath>
                        #include<iomanip>
                        #include<queue>
                        #include<algorithm>
                        #include<vector>
                        #include<stack>
                        #include<set>
                        using namespace std;
                        #define LL long long
                        const int N=100;
                        using namespace std;
                        int f(int n,int m)
                        {
                        	f(n%2)
                        }
                        int main()
                        {
                        	int a,b;
                        	cin>>a>>b;
                        	cout<<f(a,b);
                        	return 0;
                        }
                        
                        
                        • 0
                          @ 2023-12-14 22:43:38
                          #include<stdio.h>
                          int main()
                          {
                              int n,a,b,c;
                              scanf("%d",&n);
                              a=n/100;
                              b=n/10%10;
                              c=n%10;
                              printf("%d%d%d\n",c,b,a);
                              return 0;
                          }
                          
                          • -1
                            @ 2023-4-22 14:42:11

                            #include using namespace std; int main(){ int n; cin>>n; cout<<n%10; cout<<n%100/10; cout<<n/100; return 0;

                            }

                            • -1
                              @ 2023-4-20 20:38:42

                              #include

                              using namespace std;

                              int a[1111];

                              int main(){ int n;

                              cin>>n;
                              for(int i=1;i<=3;i++){
                              	cout<<n%10;
                              	n/=10;
                              }
                              

                              }

                              • -2
                                @ 2023-6-1 21:00:32

                                需要这么难?

                                #include <iostream>
                                #include <bits/stdc++.h>
                                using namespace std;
                                const int N=1e7+10;
                                const int INF=0x3f3f3f3f;
                                int main()
                                {
                                	int a;
                                	cin>>a;
                                	cout<<a%10<<a/10%10<<a/100%10;
                                }
                                
                                • -2
                                  @ 2023-4-22 14:41:33

                                  #include using namespace std; int main(){ int n; cin>>n; cout<<n%10; cout<<n%100/10; cout<<n/100; return 0;

                                  }

                                  • -3
                                    @ 2023-3-12 18:22:32
                                    #include<iostream>
                                    using namespace std;
                                    int main(){
                                    	string a;
                                    	cin>>a;
                                    	for(int i = a.size()-1; i >= 0; i -- ){
                                    		cout<<a[i];
                                    	}
                                    	return 0;
                                    }
                                    
                                    • -4
                                      @ 2022-8-26 10:31:19

                                      #include using namespace std; int main(){ int n; cin>>n; int ge=n%10; int shi=n/10%10; int bai=n/100; cout<<ge<<shi<<bai; }

                                      • -4
                                        @ 2022-8-24 21:19:28
                                        #include <bits/stdc++.h>
                                        
                                        using namespace std;
                                        
                                        int main(void)
                                        {
                                        	int a;
                                        
                                        	cin >> a;
                                        
                                        	int x, y, z;
                                        
                                        	x = a % 100 % 10;
                                        	y = (a % 100 - x) / 10;
                                        	z = (a - y * 10 - x) / 100;
                                        
                                        	cout << x << y << z;
                                        
                                        	return 0;
                                        }
                                        
                                        • -4
                                          @ 2022-8-13 19:05:23
                                          #include <iostream>
                                          #include <algorithm>
                                          #include <cstdio>
                                          #include <cstring>
                                          #include <string>
                                          #include <iomanip>
                                          #include <cmath>
                                          #include <queue>
                                          #include <map>
                                          #include <stack>
                                          #include <vector>
                                          using namespace std;
                                          #define long long LL
                                          const int N = 1e6+6;
                                          const int INF = 0x3f3f3f3f;
                                          int main(){
                                              string s;
                                              cin >> s;
                                              for (int i = 2;i>=0;i--){
                                                  cout << s[i];
                                              }
                                              return 0;
                                          }
                                          

                                          信息

                                          ID
                                          837
                                          时间
                                          1000ms
                                          内存
                                          128MiB
                                          难度
                                          5
                                          标签
                                          递交数
                                          1881
                                          已通过
                                          707
                                          上传者