2 条题解

  • 1
    @ 2026-2-27 14:49:45

    #include <bits/stdc++.h> using namespace std; int main(){ string n; cin>>n; if(n[0]>='0'&&n[0]<='9'){ cout<<"no"; return 0; } for(int i=0;i<n.length();i++){ if((n[i]>='0'&&n[i]<='9')||(n[i]>='A'&&n[i]<='Z')||(n[i]>='a'&&n[i]<='z')||n[i]==''){ continue; }else{ cout<<"no"; return 0; } } cout<<"yes"; return 0; } //@@dingsheng 感谢你的代码!!~~

    • 0
      @ 2025-1-10 16:56:35
      #include <bits/stdc++.h>
      using namespace std;
      int main() {
          string s;
          cin >> s;
          int n = s.length();
          if (n == 0 || n > 20) {
              cout<<"no";
              return 0;
          }
          if (isdigit(s[0])) {
              cout<<"no";
              return 0;
          }
          for (int i = 0; i < n; ++i) {
              if (!isalnum(s[i]) && s[i] != '_') {
                  cout<<"no";
                  return 0;
              }
          }
          cout<<"yes";
          return 0;
      }
      \\沙威玛,沙威玛,沙威玛 🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯🌯
      
      • 1

      信息

      ID
      1295
      时间
      1000ms
      内存
      128MiB
      难度
      3
      标签
      递交数
      76
      已通过
      40
      上传者