19 条题解

  • 0
    @ 2024-11-9 16:32:06

    搞笑题解,请输入样例

    #include<bits/stdc++.h>
    using namespace std;
    const int N=1e5+10;
    int main(){
    	int n;
    	char a[10000]; 
    	cin.getline(a,501);
    	n=strlen(a);
    	for(int i=0;i<=n;i++){
    		if(int(a[i])<=90&&int(a[i])>=65){
    			a[i]+=32;
    			cout<<char(a[i]);
    		}
    		if(int(a[i])>=97&&int(a[i])<=122){
    			a[i]+=32;
    			cout<<char(a[i]);
    		}
    		if(int(a[i])==32){
    			cout<<" ";
    		}
    		else cout<<a[i];
    	}
    	return 0;	
    }
     
    
    • 0
      @ 2023-5-17 20:26:17
      #include<iostream> 
      #include<cmath>
      #include<iomanip>
      #include <cstring>
      using namespace std;
      int INF=0x3f3f3f3f;
      const int N=1e5+10;
      int ans;
      char a[N];
      int main()
      {
      	cin.getline(a,255);
      	int len=strlen(a);
      	for(int i=0;i<=len-1;i++)
      	{
      		if(a[i]<=90 && a[i]>=65)
      		{
      			a[i]+=32;
      			cout<<a[i];
      		}
      		else if(a[i]<=122 && a[i]>=97)
      		{
      			a[i]-=32;
      			cout<<a[i];
      		}
      		else{
      			cout<<a[i];
      		}
      	}
      	return 0;
      }
      
      • -1
        @ 2024-5-7 17:37:38

        有人投诉,再发一次

        #include<bits/stdc++.h>
        using namespace std;
        int main(){
        	int n;
        	char a[10000]; 
        	cin.getline(a,501);
        	n=strlen(a);
        	for(int i=0;i<n;i++){
        		if(int(a[i])<=90&&int(a[i])>=65){
        			a[i]+=32;
        			cout<<char(a[i]);
        		}
        		else
        		if(int(a[i])>=97&&int(a[i])<=122){
        			a[i]-=32;
        			cout<<char(a[i]);
        		}
        		else
        		if(int(a[i])==32){
        			cout<<" ";
        		}
        		else cout<<a[i];
        		
          
        	}
        
        
        	
        }
        
        • -1
          @ 2024-5-7 17:27:58

          👍 👍 👍 good 认准这个作者

          #include<bits/stdc++.h>
          using namespace std;
          int main(){
          	int n;
          	char a[10000]; 
          	cin.getline(a,501);
          	n=strlen(a);
          	for(int i=0;i<n;i++){
          		if(int(a[i])<=90&&int(a[i])>=65){
          			a[i]+=32;
          			cout<<char(a[i]);
          		}
          		else
          		if(int(a[i])>=97&&int(a[i])<=122){
          			a[i]-=32;
          			cout<<char(a[i]);
          		}
          		else
          		if(int(a[i])==32){
          			cout<<" ";
          		}
          		else cout<<a[i];
          		
            
          	}
          
          
          	
          }
          
        • -1

          高级代码

          #include<cstring>
          #include<iostream>
          using namespace std;
          int ans;
          const int N=1145;
          char a[N];
          int main()
          {
          	cin.getline(a,255);
          	int len=strlen(a);
          	for(int i=0;i<=len-1;i++)
          	{
          		if(a[i]<=90 && a[i]>=65)
          		{
          			a[i]+=32;
          			cout<<a[i];
          		}
          		else if(a[i]<=122 && a[i]>=97)
          		{
          			a[i]-=32;
          			cout<<a[i];
          		}
          		else{
          			cout<<a[i];
          		}
          	}
          	return 0;
          }
          
          
          • @ 2024-5-7 17:30:13

            👎 👎 👎 是错的 用不了😕

          • @ 2024-5-7 17:34:24

            hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh哈哈哈哈哈哈哈哈哈哈或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或哈哈哈哈哈哈哈哈哈哈或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或哈哈哈哈哈哈哈哈哈哈或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或或哈哈哈哈哈哈哈哈哈哈红红火火恍恍惚惚@

          • @ 2024-5-7 17:34:48

            太损了@

        • -1
          @ 2024-1-30 11:07:25

          只能拿90分

          爱信不信
          #include <cstring>
          using namespace std;
          int main(){
           	char a[505];
          	cin.getline(a,505);
          	int len=strlen(a);
          	for(int i=0;i<len;i++){
          	    if('a'<=a[i]&&a[i]<='z'){
          		    a[i]-=32;
          		    cout<<a[i];
          		}
          		else if('A'<=a[i]&&a[i]<='z'){
          			    a[i]+=32;
          			    cout<<a[i];
          		}
          		else cout<<a[i];
          	}
          	return 0;
          }
          
        • -1
          @ 2024-1-30 11:05:49
          using namespace std;
          int main(){
          	char a[505];
          	cin.getline(a,505);
          	int len=strlen(a);
          	for(int i=0;i<=len-1;i++){
          		if('A'<=a[i]&&a[i]<='Z'){
          			a[i]+=32;
          			cout<<a[i]; 
          		}
          		else if('a'<=a[i]&&a[i]<='z'){
          			a[i]-=32;
          			cout<<a[i];
          		}
          		else cout<<a[i];
          	}
          	return 0;
          }
          
          
          • -1
            @ 2024-1-30 11:05:39

            #include<bits/stdc++.h> using namespace std; int main(){ char a[505]; cin.getline(a,505); int len=strlen(a); for(int i=0;i<=len-1;i++){ if('A'<=a[i]&&a[i]<='Z'){ a[i]+=32; cout<<a[i]; } else if('a'<=a[i]&&a[i]<='z'){ a[i]-=32; cout<<a[i]; } else cout<<a[i]; } return 0; }

            • -1
              @ 2024-1-30 11:05:24

              `#include using namespace std; int main(){ char a[505]; cin.getline(a,505); int len=strlen(a); for(int i=0;i<=len-1;i++){ if('A'<=a[i]&&a[i]<='Z'){ a[i]+=32; cout< ``

              • -1
                @ 2024-1-30 11:05:06

                #include<bits/stdc++.h> using namespace std; int main(){ char a[505]; cin.getline(a,505); int len=strlen(a); for(int i=0;i<=len-1;i++){ if('A'<=a[i]&&a[i]<='Z'){ a[i]+=32; cout<<a[i]; } else if('a'<=a[i]&&a[i]<='z'){ a[i]-=32; cout<<a[i]; } else cout<<a[i]; } return 0; }

                • -1
                  @ 2024-1-30 11:04:50

                  #include<bits/stdc++.h> using namespace std; int main(){ char a[505]; cin.getline(a,505); int len=strlen(a); for(int i=0;i<=len-1;i++){ if('A'<=a[i]&&a[i]<='Z'){ a[i]+=32; cout<<a[i]; } else if('a'<=a[i]&&a[i]<='z'){ a[i]-=32; cout<<a[i]; } else cout<<a[i]; } return 0; }

                  • -1
                    @ 2024-1-30 11:03:24
                    #include<bits/stdc++.h>
                    using namespace std;
                    int main(){
                    	char a[505];
                    	cin.getline(a,505);
                    	int len=strlen(a);
                    	for(int i=0;i<=len-1;i++){
                    		if('A'<=a[i]&&a[i]<='Z'){
                    			a[i]+=32;
                    			cout<<a[i]; 
                    		}
                    		else if('a'<=a[i]&&a[i]<='z'){
                    			a[i]-=32;
                    			cout<<a[i];
                    		}
                    		else cout<<a[i];
                    	}
                    	return 0;
                    }
                    
                    • -1
                      @ 2024-1-30 10:50:21
                      #include<iostream>#include<cmath>#include<iomanip>#include <cstring>using namespace std;int INF=0x3f3f3f3f;const int N=1e5+10;int ans;char a[N];int main(){cin.getline(a,255);int len=strlen(a);for(int i=0;i<=len-1;i++){if(a[i]<=90 && a[i]>=65){a[i]+=32;cout<<a[i];}else if(a[i]<=122 && a[i]>=97){a[i]-=32;cout<<a[i];}else{cout<<a[i];}}return 0;}
                      
                      • -1
                        @ 2023-12-14 20:57:59

                        #include<bits/stdc++.h> using namespace std; int main(){ string a; getline(cin,a); int len=a.size(); for(int i=0;i<len;i++){ if(a[i]>='a'&&a[i]<='z'){ a[i]=a[i]-'a'+'A'; } else if(a[i]>='A'&&a[i]<='Z'){ a[i]=a[i]-'A'+'a'; } } cout<<a<<endl; return 0; }

                        • -1
                          @ 2023-5-17 19:56:41
                          using namespace std;
                          char a[500];
                          int ans=32;
                          int main(){
                          	cin.getline(a,500);
                          	int len=strlen(a);
                          	for(int i=0; i<=len-1; i++){
                          		if(a[i]>='A'&&a[i]<='Z'){
                          			a[i]+=ans;
                          		}
                          		else if(a[i]>='a'&&a[i]<='z'){
                          			a[i]-=ans;
                          		}
                          	}
                          	cout << a;
                          	return 0;
                          }
                          
                          
                          
                          • -1

                            啊非常简单的代码好吧~

                            #include<iostream>
                            using namespace std;
                            string s;
                            int main(){
                            	getline(cin,s);
                            	for(int j=0;j<s.length();j++){
                            		if(s[j]>='A'&&s[j]<='Z') s[j]+=32;
                            		else if(s[j]>='a'&&s[j]<='z') s[j]-=32;
                            		cout<<s[j];
                            	}
                            	return 0;
                            }
                            
                            • -1
                              @ 2021-12-7 17:42:03

                              /***************************************** 备注: ******************************************/ #include <queue> #include <math.h> #include <stack> #include <stdio.h> #include <iostream> #include <vector> #include <iomanip> #include <string.h> #include <algorithm> using namespace std; #define LL long long const int N = 1e5 + 10; const int INF = 0x3f3f3f3f; int a[N];

                              int main() {

                              string a;
                              getline(cin,a);
                              int x=a.size();
                              for(int j=0;j<x;j++)
                              {
                              	
                              	if(a[j]<91&&a[j]>='A')
                              	{
                              		a[j]+=32;
                              	}else if(a[j]<='z'&&a[j]>='a') a[j]-=32;
                              	
                              	cout<<char(a[j]);
                              }
                              

                              }

                              • -2
                                @ 2023-4-6 19:23:48
                                #include<iostream>
                                #include<cstring>
                                using namespace std;
                                char a[114514];
                                const int CAPS=32;
                                int main()
                                {
                                    cin.getline(a,114514);
                                    for(int i=0;i<strlen(a);i++)
                                    {
                                        if('A'<=a[i]&&a[i]<='Z')a[i]+=CAPS;
                                        else if('a'<=a[i]&&a[i]<='z')a[i]-=CAPS;
                                    }
                                    cout<<a;
                                    return 0;
                                }
                                
                                
                                • -2
                                  @ 2022-3-5 8:54:44
                                  #include <queue> 
                                  #include <math.h> 
                                  #include <stack> 
                                  #include <stdio.h>
                                  #include <iostream>
                                  #include <vector> 
                                  #include <iomanip> 
                                  #include <string.h> 
                                  #include <algorithm>
                                  using namespace std;
                                  #define LL long long
                                  const int N = 1e5 + 10; 
                                  const int INF = 0x3f3f3f3f; 
                                  int a[N];
                                  int main() 
                                  { 
                                  string a;
                                  getline(cin,a);
                                  int x=a.size();
                                  for(int j=0;j<x;j++)
                                  {
                                      
                                      if(a[j]<91&&a[j]>='A')
                                      {
                                          a[j]+=32;
                                      }else if(a[j]<='z'&&a[j]>='a') a[j]-=32;
                                      
                                      cout<<char(a[j]);
                                  }
                                  }
                                  
                                  • 1

                                  信息

                                  ID
                                  1092
                                  时间
                                  1000ms
                                  内存
                                  128MiB
                                  难度
                                  5
                                  标签
                                  递交数
                                  669
                                  已通过
                                  236
                                  上传者