摘要:
Smallest multiple 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest posi 阅读全文
摘要:
Largest palindrome product A palindromic number reads the same both ways. The largest palindrome made from the product of two 2 digit numbers is 9009 阅读全文
摘要:
Largest prime factor The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? 最大质因数 13195的所有质因数为5 阅读全文
摘要:
Even Fibonacci numbers Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 t 阅读全文
摘要:
Multiples of 3 and 5 If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. 阅读全文
摘要:
题目链接: "https://www.luogu.com.cn/problem/P4017" 解题思路: 定义 $f[i]$ 为到点 $i$ 的方案数,则: $$f[i] = \sum_{j \to i}{f[j]}$$ 其中 $j \to i$ 表示存在一条从 $j$ 到 $i$ 的边。 实现代码 阅读全文
摘要:
题目链接: "https://www.luogu.com.cn/problem/P1964" 对于第 $i$ 件物品: 如果 $a_i$ 能被 $c_i$ 整除,则将其转换成 $\frac{a_i}{c_i}$ 件体积为 $1$,价格为 ${c_i} \cdot b_i$ 的物品; 如果 $a_i$ 阅读全文