Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
123256 罗迎甲 合法的标识符 C++ Compile Error 0 MS 0 KB 621 2025-06-28 16:17:20

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ string a; char b; getline(cin,a); int a1=a.length(); int c; if(a[0]<='9'&&a[0]>='0'){ cout<<"No" ; return 0; } for(int b;b<=a1;b++){ b=a[b]; if(!((b<='9'&&a[0]>='0')||(b<='z'&&b>='a')||(b<='Z'&&b>='A')||(b=='_'))){ cout<<"No" ; return 0; } cout<<"Yes"<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:10: warning: unused variable 'b' [-Wunused-variable]
     char b;
          ^
Main.cc:12:9: warning: unused variable 'c' [-Wunused-variable]
     int c;
         ^
Main.cc:25:1: error: expected '}' at end of input
 }
 ^