Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
107349 胡盛哲 合法的标识符 C++ Compile Error 0 MS 0 KB 351 2025-01-17 15:28:23

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; string s; int main() { int n=s.size(); cin >> s; if { cout << "no"; return 0; } for(int i=0; i<n; i++) { if((s[i]>='a'&&s[i]<='z') || (s[i]>='0'&&s[i]<='9') ||(s[i]>='A'&&s[i]<='Z')||s[i]=='_') { } else { cout << "no"; return 0; } } cout << "yes"; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:5: error: expected '(' before '{' token
  if {
     ^