QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#465788 | #5422. Perfect Palindrome | JustJie | WA | 0ms | 3608kb | C++20 | 783b | 2024-07-07 09:31:54 | 2024-07-07 09:31:54 |
Judging History
answer
/***************************************************************************************************
* author : Jie Chen (4th Year CS)
* school : Rochester Institute of Technology
* created: 07.06.2024 21:30:27
****************************************************************************************************/
#include "bits/stdc++.h"
using namespace std;
using i64 = long long;
void work(int tc) {
string s;
cin >> s;
int n = s.size();
int ans = 0;
for (int i = 0; i < n; i++) {
ans += int(s[i] != s[n - i - 1]);
}
cout << ans << "\n";
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T;
cin >> T;
for (int t = 1; T--; t++) {
work(t);
}
}
// ~ Just Jie
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3608kb
input:
2 abcb xxx
output:
4 0
result:
wrong answer 1st numbers differ - expected: '2', found: '4'