尤拉計畫 第四題

2021-06-29 04:06:06 字數 612 閱讀 7827

乙個回文數指的是從左向右和從右向左讀都一樣的數字。最大的由兩個兩位數乘積構成的回文數是9009 = 91 * 99.

找出最大的有由個三位數乘積構成的回文數。

源**

stdmethodimp coula::test4(int imaxnumber)

//printf("ifirstnumber is %d.\n", ifirstnumber);

if(outputnumber%10 == ifirstnumber && (outputnumber/10%10) == isecondnumber && (outputnumber/100%10) == ithirdnumber)

}} printf("the test 4 number is %d.\n",imaxoutputnumber);

return s_ok;

}

函式呼叫

#define test4_number 1000

ioula->test4(test4_number);

輸出

the test 4 number is 906609.

尤拉計畫36題

double base palindromes problem 36 the decimal number,585 10010010012 binary is palindromic in both bases.find the sum of all numbers,less than one mi...

尤拉計畫第3題

problem 3 the prime factors of 13195 are 5,7,13 and 29.what is the largest prime factor of the number 600851475143.問題3 13195的質因數為5,7,13和 29。6008514751...

尤拉計畫 第二題

斐波那契數列中的每一項被定義為前兩項之和。從1和2開始,斐波那契數列的前十項為 1,2,3,5,8,13,21,34,55,89,考慮斐波那契數列中數值不超過4百萬的項,找出這些項中值為偶數的項之和。源 stdmethodimp coula test2 int imaxnumber printf d...