1. Write a function, whose function is to determine whether a number is palindrome number. (the so-called palindrome number is read from left to right and read from right to left is the same number, such as 101). Find such a number between 11 and 999, it is not only palindrome number, but also its square sum cube is palindrome number

1. Write a function, whose function is to determine whether a number is palindrome number. (the so-called palindrome number is read from left to right and read from right to left is the same number, such as 101). Find such a number between 11 and 999, it is not only palindrome number, but also its square sum cube is palindrome number


#include "stdio.h"bool IsHws(long l){long a = l;long b = 0;while ( a > 0 ){int n = a%10;a=a/10;b = b*10+n;}return l==b;}int main(){for ( long i=11; i<=999; ++i ){if (  IsHws(i) && IsHws(i*i) && IsHws(i*i*i) ){printf("%d ", i);}}return 0;}



Proof: the product of four consecutive integers plus 1 is the square of an integer


Let the four consecutive integers be n-1, N, N + 1, N + 2, then (n-1) n (n + 1) (n + 2) + 1, = [(n-1) (n + 2)] [n (n + 1)] + 1 = (N2 + n-2) (N2 + n) + 1 = (N2 + n) 2-2 (N2 + n) + 1 = (N2 + n-1) 2. Therefore, the product of four consecutive integers plus 1 is the square of an integer



A positive integer, if 100 is a perfect square, if 168 is another perfect square, then the positive integer is______ .


Let the number be n. from the meaning of the question, we can get: n + 168 = A2 (1)n+100=b2… (2) (1) - (2), 68 = A2-B2 = (a + b) (a-b), because 68 = 1 × 68 = 2 × 34 = 4 × 17, there are only three cases, namely: ① a + B = 68, A-B = 1; ② a + B = 34, A-B = 2; ③ a + B = 17, A-B = 4; because ① A and B have no integer solution, exclude; ② calculate a = 18, B = 16, so: n = 182-168 = 162-10 = 156; ③ A and B have no integer solution, exclude To sum up, only n = 156, that is, the number sought. So the answer is: 156