社区讨论

50分求助(玄关)

B2124判断字符串是否为回文参与者 3已保存回复 4

讨论操作

快速查看讨论及其快照的属性,并进行相关操作。

当前回复
4 条
当前快照
1 份
快照标识符
@loy7iat6
此快照首次捕获于
2023/11/14 18:44
2 年前
此快照最后确认于
2023/11/14 20:18
2 年前
查看原帖
CPP
#include <bits/stdc++.h>
using namespace std;

int main(){
	string s,tmp;
	cin >> s;
	tmp = s;
	reverse(tmp.begin(),tmp.end());
	if(tmp==s) cout << "yes" << endl;
	else cout << 'no' << endl;
	return 0;
}

为啥五十分

回复

4 条回复,欢迎继续交流。

正在加载回复...