1 条题解

  • 0
    @ 2024-12-24 9:49:23

    C++ :

    #include<iostream>
    #include<cstdio>
    #include<cstring>
    using namespace std;
    int main()
    {
    	char s[100];
    	int i, j, b, c = 0;
    	cin >> s;
    	int l = strlen(s);
    	for ( j = 0; s[j]!='.'&&s[j]!='\0'; j++)
    	{
    		;
    	}
    	for (i = 0, b = j - 1; i < j; i++, b--)
    	{
    		if (s[i] == s[b])
    			c++;
    	}
    	if (c == i)
    	{
    		cout << "Yes" << endl;
    	}
    	else
    	{
    		cout << "No" << endl;
    	}
    	return 0;
    }
    
    • 1

    信息

    ID
    833
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者