2 条题解

  • 1
    @ 2024-7-25 12:33:01

    参考答案:

    #include<iostream>
    
    using namespace std;
    
    int main()
    {
        int a;
        cin >> a;
        int t = a;
        int sum = 0;
        while (t)
        {
            sum = sum * 10 + t % 10;
            t /= 10;
        }
        if (sum == a) cout << "Yes" << endl;
        else cout << "No" << endl;
    
        return 0;
    }
    
    • 0
      @ 2025-10-13 11:16:30

      Python:

      A = input()
      s = A[::-1]
      if s == A:
          print('Yes')
      else:
          print('No')
      
      • 1

      信息

      ID
      25
      时间
      1000ms
      内存
      256MiB
      难度
      6
      标签
      递交数
      30
      已通过
      12
      上传者