6 条题解

  • 0
    @ 2025-6-4 17:27:08
    
    
    • 0
      @ 2025-6-4 17:24:44

      #include<bits/stdc++.h> using namespace std; int main(){ char a; cin>>a; if(a=='a'){ cout<<"A"; } if(a=='A'){ cout<<"a"; } if(a=='b'){ cout<<"B"; } if(a=='B'){ cout<<"b"; } if(a=='c'){ cout<<"C"; } if(a=='C'){ cout<<"c"; } if(a=='d'){ cout<<"D"; } if(a=='D'){ cout<<"d"; } if(a=='e'){ cout<<"E"; } if(a=='E'){ cout<<"e"; } if(a=='f'){ cout<<"F"; } if(a=='F'){ cout<<"f"; } if(a=='g'){ cout<<"G"; } if(a=='G'){ cout<<"g"; } if(a=='h'){ cout<<"H"; } if(a=='H'){ cout<<"h"; } if(a=='i'){ cout<<"I"; } if(a=='I'){ cout<<"i"; } if(a=='j'){ cout<<"J"; } if(a=='J'){ cout<<"j"; } if(a=='k'){ cout<<"K"; }if(a=='K'){ cout<<"k"; } if(a=='l'){ cout<<"L"; } if(a=='L'){ cout<<"l"; } if(a=='m'){ cout<<"M"; } if(a=='M'){ cout<<"m"; } if(a=='n'){ cout<<"N"; } if(a=='N'){ cout<<"n"; } if(a=='o'){ cout<<"O"; } if(a=='O'){ cout<<"o"; } if(a=='p'){ cout<<"P"; } if(a=='P'){ cout<<"p"; } if(a=='q'){ cout<<"Q"; } if(a=='Q'){ cout<<"q"; } if(a=='r'){ cout<<"R"; } if(a=='R'){ cout<<"r"; } if(a=='s'){ cout<<"S"; } if(a=='S'){ cout<<"s"; } if(a=='t'){ cout<<"T"; } if(a=='T'){ cout<<"t"; } if(a=='u'){ cout<<"U"; } if(a=='U'){ cout<<"u"; } if(a=='v'){ cout<<"V"; } if(a=='V'){ cout<<"v"; } if(a=='w'){ cout<<"W"; } if(a=='W'){ cout<<"w"; } if(a=='x'){ cout<<"X"; } if(a=='X'){ cout<<"x"; } if(a=='y'){ cout<<"Y"; } if(a=='Y'){ cout<<"y"; } if(a=='z'){ cout<<"Z"; } if(a=='Z'){ cout<<"z"; } return 0; }

      • -1
        @ 2025-11-30 9:29:36
        
        
        #include<bits/stdc++.h>
        using namespace std;
        int main(){
        	char a;
        	cin>>a;
        	if(a=='a'){
        		cout<<"A";
        	}
        	if(a=='A'){
        		cout<<"a";
        	}
        	if(a=='b'){
        		cout<<"B";
        	}
        	if(a=='B'){
        		cout<<"b";
        	}
        	if(a=='c'){
        		cout<<"C";
        	}
        	if(a=='C'){
        		cout<<"c";
        	}
        	if(a=='d'){
        		cout<<"D";
        	}
        	if(a=='D'){
        		cout<<"d";
        	}
        	if(a=='e'){
        		cout<<"E";
        	}
        	if(a=='E'){
        		cout<<"e";
        	}
        	if(a=='f'){
        		cout<<"F";
        	}
        	if(a=='F'){
        		cout<<"f";
        	}
        	if(a=='g'){
        		cout<<"G";
        	}
        	if(a=='G'){
        		cout<<"g";
        	}
        	if(a=='h'){
        		cout<<"H";
        	}
        	if(a=='H'){
        		cout<<"h";
        	}
        	if(a=='i'){
        		cout<<"I";
        	}
        	if(a=='I'){
        		cout<<"i";
        	}
        	if(a=='j'){
        		cout<<"J";
        	}
        	if(a=='J'){
        		cout<<"j";
        	}
        	if(a=='k'){
        		cout<<"K";
        	}if(a=='K'){
        		cout<<"k";
        	}
        	if(a=='l'){
        		cout<<"L";
        	}
        	if(a=='L'){
        		cout<<"l";
        	}
        	if(a=='m'){
        		cout<<"M";
        	}
        	if(a=='M'){
        		cout<<"m";
        	}
        	if(a=='n'){
        		cout<<"N";
        	}
            if(a=='N'){
        		cout<<"n";
        	}
        	if(a=='o'){
        		cout<<"O";
        	}
        	if(a=='O'){
        		cout<<"o";
        	}
        	if(a=='p'){
        		cout<<"P";
        	}
        	if(a=='P'){
        		cout<<"p";
        	}
        	if(a=='q'){
        		cout<<"Q";
        	}
        	if(a=='Q'){
        		cout<<"q";
        	}
        	if(a=='r'){
        		cout<<"R";
        	}
        	if(a=='R'){
        		cout<<"r";
        	}
        	if(a=='s'){
        		cout<<"S";
        	}
        	if(a=='S'){
        		cout<<"s";
        	}
        	if(a=='t'){
        		cout<<"T";
        	}
        	if(a=='T'){
        		cout<<"t";
        	}
        	if(a=='u'){
        		cout<<"U";
        	}
        	if(a=='U'){
        		cout<<"u";
        	}
        	if(a=='v'){
        		cout<<"V";
        	}
        	if(a=='V'){
        		cout<<"v";
        	}
        	if(a=='w'){
        		cout<<"W";
        	}
        	if(a=='W'){
        		cout<<"w";
        	}
        	if(a=='x'){
        		cout<<"X";
        	}
        	if(a=='X'){
        		cout<<"x";
        	}
        	if(a=='y'){
        		cout<<"Y";
        	}
        	if(a=='Y'){
        		cout<<"y";
        	}
        	if(a=='z'){
        		cout<<"Z";
        	}
        	if(a=='Z'){
        		cout<<"z";
        	}
        	return 0;
        }
        
        
        
        
      • -1
        @ 2025-6-4 17:26:43

        我长不长?

        using namespace std;
        int main(){
        	char a;
        	cin>>a;
        	if(a=='a'){
        		cout<<"A";
        	}
        	if(a=='A'){
        		cout<<"a";
        	}
        	if(a=='b'){
        		cout<<"B";
        	}
        	if(a=='B'){
        		cout<<"b";
        	}
        	if(a=='c'){
        		cout<<"C";
        	}
        	if(a=='C'){
        		cout<<"c";
        	}
        	if(a=='d'){
        		cout<<"D";
        	}
        	if(a=='D'){
        		cout<<"d";
        	}
        	if(a=='e'){
        		cout<<"E";
        	}
        	if(a=='E'){
        		cout<<"e";
        	}
        	if(a=='f'){
        		cout<<"F";
        	}
        	if(a=='F'){
        		cout<<"f";
        	}
        	if(a=='g'){
        		cout<<"G";
        	}
        	if(a=='G'){
        		cout<<"g";
        	}
        	if(a=='h'){
        		cout<<"H";
        	}
        	if(a=='H'){
        		cout<<"h";
        	}
        	if(a=='i'){
        		cout<<"I";
        	}
        	if(a=='I'){
        		cout<<"i";
        	}
        	if(a=='j'){
        		cout<<"J";
        	}
        	if(a=='J'){
        		cout<<"j";
        	}
        	if(a=='k'){
        		cout<<"K";
        	}if(a=='K'){
        		cout<<"k";
        	}
        	if(a=='l'){
        		cout<<"L";
        	}
        	if(a=='L'){
        		cout<<"l";
        	}
        	if(a=='m'){
        		cout<<"M";
        	}
        	if(a=='M'){
        		cout<<"m";
        	}
        	if(a=='n'){
        		cout<<"N";
        	}
            if(a=='N'){
        		cout<<"n";
        	}
        	if(a=='o'){
        		cout<<"O";
        	}
        	if(a=='O'){
        		cout<<"o";
        	}
        	if(a=='p'){
        		cout<<"P";
        	}
        	if(a=='P'){
        		cout<<"p";
        	}
        	if(a=='q'){
        		cout<<"Q";
        	}
        	if(a=='Q'){
        		cout<<"q";
        	}
        	if(a=='r'){
        		cout<<"R";
        	}
        	if(a=='R'){
        		cout<<"r";
        	}
        	if(a=='s'){
        		cout<<"S";
        	}
        	if(a=='S'){
        		cout<<"s";
        	}
        	if(a=='t'){
        		cout<<"T";
        	}
        	if(a=='T'){
        		cout<<"t";
        	}
        	if(a=='u'){
        		cout<<"U";
        	}
        	if(a=='U'){
        		cout<<"u";
        	}
        	if(a=='v'){
        		cout<<"V";
        	}
        	if(a=='V'){
        		cout<<"v";
        	}
        	if(a=='w'){
        		cout<<"W";
        	}
        	if(a=='W'){
        		cout<<"w";
        	}
        	if(a=='x'){
        		cout<<"X";
        	}
        	if(a=='X'){
        		cout<<"x";
        	}
        	if(a=='y'){
        		cout<<"Y";
        	}
        	if(a=='Y'){
        		cout<<"y";
        	}
        	if(a=='z'){
        		cout<<"Z";
        	}
        	if(a=='Z'){
        		cout<<"z";
        	}
        	return 0;
        }
        
        
        • @ 2025-11-30 9:27:46

          不长,有点“短”。

      • -1
        @ 2025-1-1 12:22:43

        直接判断输出。

        #include<bits/stdc++.h>
        #define int long long
        #define INF 0x3f3f3f
        using namespace std;
        char c;
        signed main(){
        	cin>>c;
        	if(c>='a')cout<<char(c-32);
        	else cout<<char(c+32);
        	return 0;
        }
        
        • -2
          @ 2024-12-30 21:11:37
          #include<bits/stdc++.h>
          using namespace std;
          signed main(){
          	char a;
          	cin>>a;
          	if(isupper(a))cout<<char(a+32);
          	else cout<<char(a-32);
          }
          
          • 1

          信息

          ID
          61
          时间
          1000ms
          内存
          128MiB
          难度
          1
          标签
          递交数
          37
          已通过
          85
          上传者