Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
44303 | chenyanda | 合法C标识符 | C++ | Wrong Answer | 1 MS | 248 KB | 322 | 2024-03-29 17:36:27 |
#include<iostream> #include<cstring> using namespace std; int main() { char s[20],cnt=0; cin>>s; for(int i=0;i<strlen(s)-1;i++){ if(s[i]>='A'&&s[i]<='Z'||s[i]>='a'&&s[i]<='z'){ cnt++; } } if(strlen(s)==cnt&&s[0]<'0'||strlen(s)==cnt&&s[0]>'9'){ cout<<"yes"; } else{ cout<<"no"; } }