Difference between revisions of "Project Euler"
Jump to navigation
Jump to search
Xiejiadong (talk | contribs) |
Xiejiadong (talk | contribs) |
||
Line 3: | Line 3: | ||
== Problem 1 == | == Problem 1 == | ||
− | + | === Multiples of 3 and 5 === | |
Solved by Xiejiadong & Czarina. | Solved by Xiejiadong & Czarina. |
Revision as of 04:16, 21 December 2018
挖了一个大坑,天知道什么时候能填完。感觉是不可能填完的。
Problem 1
Multiples of 3 and 5
Solved by Xiejiadong & Czarina.
题意:$1000$以下约数包含$3$和$5$的数和。
题解:直接暴力/等差数列求和。
答案:233168。
Problem 2
Problem 36
Double-base palindromes
Solved by Xiejiadong.
题意:求$10^6$以下满足十进制和二进制都是回文数的所有数和。
题解:枚举二进制的长度,dfs暴力所有的二进制数,再判断十进制数是否符合题意。
为了防止重复,我们要在制定二进制的长度以后,默认第一位必须是$1$。
答案:872187。