见到就删,尤其禁止人身攻击,可以揭发举报抄题解等行为

6 条评论

  • @ 2023-10-22 9:35:52
    using namespace std;
    bool cc(int a)
    {
        int t = 0;
        int temp;
        int at = a;
        while (a != 0)
        {
            temp = a % 10;
            a /= 10;
            t *= 10;
            t += temp;
        }
        if (t == at)
        {
            return 1;
        }
        return 0;
    }
    bool bb(int n)
    {
        if (n <= 1)
        {
            return false;
        }
        for (int i = 2; i < n; i++)
        {
            if ((n % i) == 0)
            {
                return false;
            }
        }
        return true;
    }
        int main()
        {
            int b;
            int sum = 0;
            cin >> b;
            for (int i = 11; i <= b; i++)
            {
                if (cc(i) and bb(i))
                {
                    sum++;
                }
            }
            cout << sum << endl;
            return 0;
        }   
    
    
    
    
    
    • @ 2023-10-22 9:34:56

      #include using namespace std; bool cc(int a) { int t = 0; int temp; int at = a; while (a != 0) { temp = a % 10; a /= 10; t *= 10; t += temp; } if (t == at) { return 1; } return 0; } bool bb(int n) { if (n <= 1) { return false; } for (int i = 2; i < n; i++) { if ((n % i) == 0) { return false; } } return true; } int main() { int b; int sum = 0; cin >> b; for (int i = 11; i <= b; i++) { if (cc(i) and bb(i)) { sum++; } } cout << sum << endl; return 0; }

      • @ 2023-7-17 11:53:11
        /* run this program using the console pauser or add your own getch, system("pause") or input loop */
        using namespace std;
        int main(int argc, char** argv) {
        long long x;
        char a,b;
        cin>>x;
        cin>>a>>b;
        if(a=='B' and b!='C'){
        	cout<<x/10*8;
        }else if(a!='C' and b=='B'){
        	cout<<x/10*8;
        }else if(a=='C' and b!='B'){
        	cout<<x/10*7;
        }else if(a!='B' and b=='C'){
        	cout<<x/10*7;
        }else if(a=='B' and b=='C'){
        	cout<<x/10*6;
        }else if(a=='C' and b=='B'){
        	cout<<x/10*6;
        }else{
        	cout<<x;
        }
        	return 0;
        }
        
        • @ 2023-7-14 14:32:09

          **👍 **

          • @ 2023-7-8 8:56:25

            • @ 2023-7-7 17:59:23

              👍 👍 👍

              • 1