4 条题解

  • 1
    @ 2023-2-20 20:07:11

    想知道为什么#include < iostream>没有颜色吗?

    #include <iostream>
    using namespace std;
    int main()
    {
        int x;
        cin >> x;
        if (x / 100 == x % 10)
        	cout << 'Y';
        else
    		cout << 'N';
        return 0;
    }
    

    因为我把cpp改成了java

    • 0
      @ 2023-10-12 23:38:07

      这和下一题我写的一模一样 不信去看

      #include<bits/stdc++.h>
      using namespace std;
      string s;
      int main()
      {
          cin>>s;
          int m=s.size(),num=0;
          for(int i=0;i<m/2;i++)
          {
              if(s[i]!=s[m-1-i])
              {
                  num++;
              }
          }
          if(num==0)
          {
              cout<<"Y";
          }
          else
          {
              cout<<"N";
          }
          return 0;
      }
      
      • 0
        @ 2023-7-20 21:32:01

        #include<bits/stdc++.h> using namespace std; int main(){ int a;cin >> a; if(a%10==a/100)cout << "Y"; else cout << "N"; }可以不用理中间(第二位)的数

        • 0
          @ 2023-4-4 17:26:21

          可以不用理中间(第二位)的数

          #include<bits/stdc++.h>
          using namespace std;
          int main()
          {
              int x;
              cin>>x;
              if (x%10==x/100)
                  cout<<"Y";
              else
                  cout<<"N";
              return 0;
          }
          
          • 1

          信息

          ID
          625
          时间
          1000ms
          内存
          64MiB
          难度
          1
          标签
          递交数
          112
          已通过
          91
          上传者