1 条题解
-
1
#include <bits/stdc++.h> using namespace std; int main() { string s; int num1 = 0, num2 = 0, num3 = 0, i = 0; while(cin >> s) { for(int i = 0; i < s.length(); i++) { if((s[i] >= 'a' and s[i] <= 'z') or (s[i] >= 'A' and s[i] <= 'Z')) { num1++; } else if(s[i] >= '0' and s[i] <= '9') { num2++; } else { num3++; } } i++; } cout << num1 << " " << num2 << " " << i << " " << num3; return 0; }
- 1
信息
- ID
- 1015
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 4
- 标签
- 递交数
- 30
- 已通过
- 18
- 上传者