QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#124299#5501. Ctrl+C Ctrl+Vftt2333Compile Error//C++14476b2023-07-14 16:42:552023-07-14 16:42:58

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-14 16:42:58]
  • 评测
  • [2023-07-14 16:42:55]
  • 提交

answer

#include <bits/stdc++.h>

int main() {
    std::cin.tie(nullptr)->sync_with_stdio(false);
    int t;
    std::cin >> t;
    whie (t--) {
        std::string s;
        std::cin >> s;
        int ans = 0;
        for (int i = 3; i < (int)s.size(); i++) {
            if (s[i - 3] == 'a' && s[i - 2] == 'n' && s[i - 1] == 'i' && s[i] == 'a') {
                ans++;
                s[i] = 'z';
            }
        }
        std::cout << ans << '\n';
    }
}

Details

answer.code: In function ‘int main()’:
answer.code:7:5: error: ‘whie’ was not declared in this scope
    7 |     whie (t--) {
      |     ^~~~