Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
86997 sh25_zhoumy 整理药名 C++ 通过 0 MS 248 KB 501 2026-04-10 15:03:02

Tests(1/1):


#include <iostream> #include <string> #include <cctype> using namespace std; int main() { int n; cin >> n; cin.ignore(); for (int i = 0; i < n; i++) { string s; getline(cin, s); if (isalpha(s[0])) { s[0] = toupper(s[0]); } for (int j = 1; j < s.size(); j++) { if (isalpha(s[j])) { s[j] = tolower(s[j]); } } cout << s << endl; } return 0; }


测评信息: