Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
107270 | 刘泽熙 | 合法的标识符 | C++ | Wrong Answer | 1 MS | 276 KB | 339 | 2025-01-17 15:11:19 |
#include<bits/stdc++.h> using namespace std; string s; int main(){ cin>>s; int a=s.size(); if(s[0]>='0'&&s[0]<='9'){ cout<<"no"; return 0; } for(int i=0;i<a;i++){ if((s[i]>='A'&&s[i]<='Z')||(s[i]>='a'&&s[i]<='z')||s[i]=='_' ||(s[i]<='9'&&s[i>='0'])){ }else{ cout<<"no"; return 0; } } cout<<"yes"; }
------Input------
a_b!d
------Answer-----
no
------Your output-----
yes