1 条题解

  • 0
    @ 2024-1-16 19:58:51
    #include <bits/stdc++.h>
    using namespace std;
    char x[21];
    int main(){
    	cin >> x;
    	if(x[0] >= 48 && x[0] <= 57){
    		cout << "no";
    		return 0;
    	}
    	for(int i = 1;i < strlen(x);i++){
    		int p = x[i];
    		if((p<'a' && p>'z') && (p<'A' && p>'Z') && p!='_'){
    			cout << "no";
    			return 0;
    		}
    	}
    	cout << "yes";
    	return 0;
    }
    
    • 1

    信息

    ID
    1104
    时间
    1000ms
    内存
    128MiB
    难度
    8
    标签
    递交数
    515
    已通过
    85
    上传者