| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 72728 | 周梓易 | 合法的标识符 | C++ | Compile Error | 0 MS | 0 KB | 383 | 2024-05-12 16:30:58 |
#include<bits/stdc++.h> using namespace std; int main() { string s; cin>>s; int len=s.size(); if(s[0]>='0'&&s[0]<='9'){ cout<<"0"; return 0; } for(int i=0;i<len;i++){ if(s[i]>='0'&&s[i]<='9'){ }else if(s[i]>='a'&&s[i]<='z'); }else if(s[i]>='A'&&s[i]<='Z'); }else if(s[i]>=='_'); }else{ cout<<"no"; } } return 0; }
Main.cc: In function 'int main()':
Main.cc:17:4: error: 'else' without a previous 'if'
}else if(s[i]>='A'&&s[i]<='Z');
^
Main.cc:17:14: error: 'i' was not declared in this scope
}else if(s[i]>='A'&&s[i]<='Z');
^
Main.cc: At global scope:
Main.cc:19:4: error: expected unqualified-id before 'else'
}else if(s[i]>=='_');
^
Main.cc:21:3: error: expected declaration before '}' token
}else{
^