1 条题解
-
1
大概就是这样
#include<iostream> #include<string> using namespace std; int main(){ string word; getline(cin,word); int ans=0; for(int i=0;i < word.size();i++){ if(word[i] >= '0' && word[i] <= '9') ans++; else if(word[i] >= 'A' && word[i] <= 'Z') ans++; else if(word[i] >= 'a' && word[i] <= 'z') ans++; } cout << ans; return 0; }
- 1
信息
- ID
- 9143
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 1
- 标签
- 递交数
- 9
- 已通过
- 5
- 上传者