1 条题解
-
0
思路
首字符与其余字符按明确合法性规则判断。按题面规定的输入输出协议处理;数据、边界和算法核验记录保存在本批教师资料。
参考程序(C++11)
#include <bits/stdc++.h> using namespace std; long long gcdll(long long a,long long b){while(b){long long t=a%b;a=b;b=t;}return a;} int main(){ios::sync_with_stdio(false);cin.tie(nullptr);const int p=1134; string s;cin>>s;bool ok=!isdigit((unsigned char)s[0]);for(char c:s)if(!isalnum((unsigned char)c)&&c!='_')ok=false;cout<<(ok?"yes":"no"); cout<<"\n";return 0;}
- 1