摘要:
感觉做法很神奇……想不到啊qwq 题目: Description 给出正整数n和k,计算j(n, k)=k mod 1 + k mod 2 + k mod 3 + … + k mod n的值 其中k mod i表示k除以i的余数。 例如j(5, 3)=3 mod 1 + 3 mod 2 + 3 mo 阅读全文
摘要:
n <= L 和 n <= 2L 情况显然,一次就能取完; 分析 n > 2L 时: Alice手速太快,Bob同学是弱势群体,所以Bob肯定不能单纯地模仿Alice,那样顶多是平手(n要是无限他俩还真就平手了)。那么他的反超策略就是:先跟着Alice,然后关键时机(瓜快没了,马上就能结束战斗)比A 阅读全文
摘要:
The binomial coefficient C(m,n) is defined as Given four natural numbers p, q, r, and s, compute the the result of dividing C(p,q) by C(r,s). 这是二次项系数,现在给 阅读全文