#include <bits/stdc++.h>
#define sf1(a) scanf("%ld",&a)
#define sf2(a,b) scanf("%ld%ld",&a,&b);
#define sf3(a,b,c) scanf("%ld%ld%ld",&a,&b,&c);
using namespace std;
main()
{
while(1)
{
long i,n,n1,rev=0,flag=0;
cin>>n;
n1=n;
while(n!=0)
{
rev=rev*10+n%10;
n/=10;
}
cout<<n1*2<<endl;
for(i=2;i<rev;i++)
{
if(rev%i==0)
{
flag=1;
break;
}
}
if((flag==0)&&(rev==n1))
break;
}
}
#define sf1(a) scanf("%ld",&a)
#define sf2(a,b) scanf("%ld%ld",&a,&b);
#define sf3(a,b,c) scanf("%ld%ld%ld",&a,&b,&c);
using namespace std;
main()
{
while(1)
{
long i,n,n1,rev=0,flag=0;
cin>>n;
n1=n;
while(n!=0)
{
rev=rev*10+n%10;
n/=10;
}
cout<<n1*2<<endl;
for(i=2;i<rev;i++)
{
if(rev%i==0)
{
flag=1;
break;
}
}
if((flag==0)&&(rev==n1))
break;
}
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন