提交时间:2024-12-03 18:34:02

运行 ID: 58075

#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; bool flag=true; for(int i=0;s[i]!='\0';i++){ if(s[0]>='0'&&s[0]<='9'){ flag=false; break; } if(s[i]>='a'&&s[i]<='z'||s[i]>='A'&&s[i]<='Z'||s[i]>='0'&&s[i]<='9'||s[i]=='_'){ continue; }else{ flag=false; } } if(flag) cout<<"yes"; else cout<<"no"; return 0; }