2 条题解

  • 0
    @ 2026-8-17 11:06:21

    #include<bits/stdc++.h> using namespace std;

    int main() { int n; cin >> n;

    int bai = n / 100;
    int ge = n % 10; /

    if (bai == ge) { cout << "Y" << endl; } else { cout << "N" << endl; }

    return 0; }

    • 0
      @ 2026-6-7 21:56:33

      #include using namespace std;

      int main() { int n; cin >> n;

      // 取出百位和个位
      int bai = n / 100;       // 百位
      int ge = n % 10;         // 个位
      
      // 判断是否相等
      if (bai == ge) {
          cout << "Y" << endl;
      } else {
          cout << "N" << endl;
      }
      
      return 0;
      

      }

      • 1

      信息

      ID
      30683
      时间
      1000ms
      内存
      256MiB
      难度
      2
      标签
      递交数
      31
      已通过
      23
      上传者