Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
80965 sh25_zhangyy 合法C标识符 C++ 通过 0 MS 256 KB 377 2026-01-04 15:36:36

Tests(3/3):


#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; }


测评信息: