Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
41503 | 老方 | 判断字符串是否为回文 | C++ | Accepted | 1 MS | 244 KB | 235 | 2024-02-21 10:56:15 |
#include<bits/stdc++.h> using namespace std; int main(){ char str[100]; cin>>str; for(int i=0;i<strlen(str)/2;i++){ if(!(str[i]==str[strlen(str)-1-i])){ cout<<"no"; return 0; } } cout<<"yes"; return 0; }