提交时间:2023-08-20 09:50:41

运行 ID: 24890

#include<bits/stdc++.h> using namespace std; int main(){ char ns[21]; cin>>ns; bool f=1; for(int i=0;i<strlen(ns);i++){ if((i==0 and not(ns[i]>='0' and ns[i]<='9')) and (ns[i]>='A' and ns[i]<='Z' or ns[i]>='a' and ns[i]<='z' or ns[i]>='0' and ns[i]<='9' or ns[i]=='_')){ f=1; } else{ f=0; break; } } if(f){ cout<<"yes"; }else{ cout<<"no"; } return 0; }