Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
123252 任艺宸 合法的标识符 C++ Compile Error 0 MS 0 KB 362 2025-06-28 15:46:14

Tests(0/0):


Code:

#include <iostream> using namespace std; int main() { string s; cin>>s; if(s[0]>='0'&&s[0]<='9'){ cout<<"no"<<endl; return 0; } for(int i=0;i<s.length();i++){ if(!((s[i]>='0'&&s[i]<='9')||(s[i]>='A'&&s[i]<='Z')||(s[i]>='a'&&s[i]<='z')||s[i]=='_')) { cout<<"no"<<endl; return 0; } } cout<<"yes"<<endl; return 0;


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i