提交时间:2021-06-27 11:46:57
运行 ID: 21298
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<s.size();i++){ if(i==0){ if(!((s[i]>='a'&&s[i]<='z')||(s[i]>='A'&&s[i]<='Z')||(s[i]=='_'))){ cout<<"no"; return 0; } }else{ if(!( (s[i]>='a'&&s[i]<='z') || (s[i]>='A'&&s[i]<='Z') || (s[i]>='0'&&s[i]<='9') || (s[i]=='_') ) ){ cout<<"no"; return 0; } } } cout<<"yes"; return 0; }