这一道题就是死在long long 和stoll上面了,简直了,这里掌握了一个新东西stoll


#include<iostream>
#include<string>
using namespace  std;
bool  isprime(long long   x)
{
    if(x<2) return  false;
     for(int i=2;i<=x/i;i++)
     {
          if(x%i==0) 
          {
              return  false;
          }
         
     }
     return  true;
}
int main()
{
    string  s;
    cin>>s;
    for(int i=s.length()-2;i>=0;i--) 
    {
        s+=s[i];
    }
     long long  c=stoll(s);
    if(isprime(c))
    {
        cout<<"prime";
    }
    else{
        cout<<"noprime";
    }
}