Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
28296 | 23级逯一鸣 | 【J】T1 | C++ | 通过 | 100 | 0 MS | 264 KB | 912 | 2024-04-14 12:10:16 |
#include <cctype> #include <cstdio> #include <iostream> using namespace std; using i64 = long long; int main() { #ifndef ONLINE_JUDGE freopen("aha.in", "r", stdin); freopen("aha.out", "w", stdout); #endif string s; cin >> s; int cnt = 0; string part[4] = { "", "", "", "" }; for (char ch : s) { if (islower(ch)) part[0] += ch; else if (isupper(ch)) part[1] += ch; else if (isdigit(ch)) part[2] += ch; else part[3] += ch; } for (const auto& s : part) cnt += int(!s.empty()); cout << "password level:" << cnt << '\n'; for (int i = 0; i < 4; ++i) { if (part[i].empty()) cout << "(Null)" << '\n'; else cout << part[i] << '\n'; } fclose(stdin); fclose(stdout); return 0; }