好耶

你这代码保熟吗?(鸡叫)  •  1年前


include <bits/stdc++.h>

using namespace std;

int main() {

string a;
int  n;
getline(cin, a);
n = a.size();
int j = n - 1, i = 0, f = 0;
while (i < j) {
	if (a[i] != a[j]) {
		f = 1;
		break;
	}
	i++;
	j--;
}
if (f == 0) {
	cout << "yes!";
} else {
	cout << "no!";
}
return 0;

}


评论:

请先登录,才能进行评论