Open utterances-bot opened 2 years ago
https://luyencode.net/problem/EZCHUXH
Đây là lời giải của mình đã AC. Nếu bạn đã cố gắng mà chưa làm được thì có thể tham khảo lời giải của mình.
``` #include #include #include int main() { std::string s; std::getline(std::cin, s); std::map m; for(auto &x : s) { if(isalpha(x)) { m[x]++; } } for(auto &x : m) { std::cout << x.first << ':' << x.second << "\n"; } return 0; } ```
Đây là lời giải của mình đã AC. C++.
```c++ #include using namespace std; string s; vector v(150, 0); int main() { getline(cin, s); for (auto x : s) if (isalpha(x)) v[x]++; for (int i = 'A'; i <= 'z'; i++) if (v[i] > 0 && isalpha(char(i))) cout << char(i) << ":" << v[i] << endl; return 0; } ```
C++
```cpp #include using namespace std; int main(){ string s;getline(cin,s); map mp; for(int i=0;i
Chi tiết bài tập - undefined
https://luyencode.net/problem/EZCHUXH