Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
3657 吴奕希 合法的标识符 C++ Accepted 0 MS 256 KB 551 2024-06-22 16:52:17

Tests(10/10):


Code:

#include <iostream> #include <string> #include <cctype> bool ivdit(const std::string& str) { if (isdigit(str[0])) { return false; } for (char c : str) { if (!isalnum(c) && c != '_') { return false; } } return true; } int main() { std::string input; std::cin >> input; if (ivdit(input)) { std::cout << "yes" << std::endl; } else { std::cout << "no" << std::endl; } return 0; }