1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
else if(num >3200000 && num <=3300000) result_result(vec,3200000,num,2200001000022);
else if(num >3300000 && num <=3400000) result_result(vec,3300000,num,2300001000032);
else if(num >3400000 && num <=3500000) result_result(vec,3400000,num,2400001000042);
else if(num >3500000 && num <=3600000) result_result(vec,3500000,num,2500001000052);
else if(num >3600000 && num <=3700000) result_result(vec,3600000,num,2600001000062);
else if(num >3700000 && num <=3800000) result_result(vec,3700000,num,2700001000072);
else if(num >3800000 && num <=3900000) result_result(vec,3800000,num,2800001000082);
else if(num >3900000 && num <=4000000) result_result(vec,3900000,num,2900001000092);
else if(num >4000000 && num <=4100000) result_result(vec,4000000,num,3000001000003);
else if(num >4100000 && num <=4200000) result_result(vec,4100000,num,3100001000013);
else if(num >4200000 && num <=4300000) result_result(vec,4200000,num,3200001000023);
else if(num >4300000 && num <=4400000) result_result(vec,4300000,num,3300001000033);
else if(num >4400000 && num <=4500000) result_result(vec,4400000,num,3400001000043);
else if(num >4500000 && num <=4600000) result_result(vec,4500000,num,3500001000053);
else if(num >4600000 && num <=4700000) result_result(vec,4600000,num,3600001000063);
else if(num >4700000 && num <=4800000) result_result(vec,4700000,num,3700001000073);
//================================================================================
else if(num >4800000 && num <=4900000) result_result(vec,4800000,num,3800001000083);
else if(num >4900000 && num <=5000000) result_result(vec,4900000,num,3900001000093);
else if(num >5000000 && num <=5100000) result_result(vec,5000000,num,4000001000004);
else if(num >5100000 && num <=5200000) result_result(vec,5100000,num,4100001000014);
else if(num >5200000 && num <=5300000) result_result(vec,5200000,num,4200001000024);
else if(num >5300000 && num <=5400000) result_result(vec,5300000,num,4300001000034);
else if(num >5400000 && num <=5500000) result_result(vec,5400000,num,4400001000044);
else if(num >5500000 && num <=5600000) result_result(vec,5500000,num,4500001000054);
else if(num >5600000 && num <=5700000) result_result(vec,5600000,num,4600001000064);
else if(num >5700000 && num <=5800000) result_result(vec,5700000,num,4700001000074);
else if(num >5800000 && num <=5900000) result_result(vec,5800000,num,4800001000084);
else if(num >5900000 && num <=6000000) result_result(vec,5900000,num,4900001000094);
else if(num >6000000 && num <=6100000) result_result(vec,6000000,num,5000001000005);
else if(num >6100000 && num <=6200000) result_result(vec,6100000,num,5100001000015);
else if(num >6200000 && num <=6300000) result_result(vec,6200000,num,5200001000025);
else if(num >6300000 && num <=6400000) result_result(vec,6300000,num,5300001000035);
//else if(num > 6400000 && num) result_result(vec,6400000,num,5300001000035);
//5400001000045
if( num > 6400000){
unsigned long long palindrome=5400001000045;
for(unsigned long long i=6400000 ; i <= 2*1000000000; i=i+100000){
// cout<< i << endl;
//cout << num << " and " << i << endl;
if( num > i && num <= i+100000 ){
result_result(vec,i,num,palindrome);
cout << "Yes :"<< i <<endl;
break;
}else {
palindrome = generate_100000_palindrom(vec, palindrome);
cout << "Else palindrome :" << palindrome << " and " << i <<endl;
// cout << "NO"<< endl;
}
}
}
//==================================================================================
}
}
|