Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
96377 | 万隽宇 | 合法的标识符 | C++ | Wrong Answer | 1 MS | 276 KB | 536 | 2024-11-07 18:30:41 |
#include<iostream> // cin\cout\endl #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() using namespace std; string s1; int main(){ getline(cin,s1); int len1=s1.length(); if(s1[0]>='0'&&s1[0]<='9'){ cout<<"no"; return 0; } for(int i=1;i<len1;i++){ if(s1[i]>='0'&&s1[i]<='9'||s1[i]>='A'&&s1[i]<='Z'||s1[i]>='a'&&s1[i]<='z'||s1[i]>'_'){ } else{ cout<<"no"; return 0; } } cout<<"yes"; return 0; }
------Input------
ma_in
------Answer-----
yes
------Your output-----
no