3021专题

poj 3021 A Number from Yanghui Triangle

推出公式来就是水题。 S(n,k) = C(n,0)+10^k*C(n,1)+10^2k*C(n,2)+.... ...+10^nk*C(n,n) 10^k*S(n,k) = 10^k*C(n,0)+10^2k*C(n,1)+10^3k*C(n,2)+.... ...+10^(n+1)k*C(n,n) 两式求和可得 S(n, k) + 10^k*S(n, k) = S(n+1, k)

Leetcode 3021. Alice and Bob Playing Flower Game

Leetcode 3021. Alice and Bob Playing Flower Game 1. 解题思路2. 代码实现 题目链接:3021. Alice and Bob Playing Flower Game 1. 解题思路 这一题真心很蠢,事实上就是只要 x + y x+y x+y为奇数Alick就能赢,因此只要看在给定的 m , n m,n m,n的情况下能组合出多少和为奇数的p