2 条题解

  • 1
    @ 2025-10-4 10:52:48
    #include<bits/stdc++.h>
    using namespace std;
    char add(char n)
    {
    	if(n>='A' && n<='Z') return 1;
    	else if(n>='a' && n<='z') return 2;
    	else if(n>='0' && n<='9') return 3;
    	else return 4;
    }
    int main()
    {
    	char n;
    	cin>>n;
    	if(add(n)==1) cout<<"upper";
    	else if(add(n)==2) cout<<"lower";
    	else if(add(n)==3) cout<<"digit";
    	else if(add(n)==4) cout<<"other";
    	return 0;
    }
    
    • 0
      @ 2024-12-29 16:21:19
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	char n;
      	cin>>n;
      	if(n>='A' && n<='Z') cout<<"upper";
      	else if(n>='a' && n<='z') cout<<"lower";
      	else if(n>='0' && n<='9') cout<<"digit";
      	else cout<<"other";
      	return 0;
      }
      
      • 1

      信息

      ID
      158
      时间
      1000ms
      内存
      256MiB
      难度
      6
      标签
      递交数
      30
      已通过
      12
      上传者