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