Project Euler 36

来源:互联网 发布:发型设计软件哪个好 编辑:程序博客网 时间:2024/06/05 04:24

原题:

The decimal number, 585 = 1001001001 (binary), is palindromic in both bases.
 Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2.
(Please note that the palindromic number, in either base, may not include leading zeros.)

分析:

利用java的Integer.toBinaryString(10)方法,将十进制转化为二进制。

原创粉丝点击