Task: | Järjestys |
Sender: | cowperso |
Submission time: | 2022-01-22 13:05:04 +0200 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 100 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.01 s | details |
Code
#include <algorithm> #include <iostream> int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); uint32_t n; std::cin >> n; for (uint32_t i = 0; i < n; ++i) { std::string jono; std::cin >> jono; uint32_t ac = std::count(jono.begin(), jono.end(), 'A'); uint32_t ac2 = std::count(jono.begin() + ac, jono.end(), 'A'); std::cout << ac2 << '\n'; } }