Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
107405 | 祝家懿 | 合法的标识符 | C++ | Wrong Answer | 1 MS | 280 KB | 358 | 2025-01-17 16:27:26 |
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int n=s.size(); 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]=='_'||s[i]>='0'&&s[i]<='9'){ } else{ cout<<"no"; return 0; } } cout<<"yes"; return 0; }
------Input------
_10674
------Answer-----
yes
------Your output-----
no