数论
文章平均质量分 68
风遥~
这个作者很懒,什么都没留下…
展开
-
约 瑟 夫 环
1.题目引入:Let’s play a stone removing game.Initially, n stones are arranged on a circle and numbered 1, …, n clockwise (Figure 1). You are also given two numbers kand m. From this state, remove stones one by one following the rules explained below, until原创 2021-10-07 21:14:11 · 95 阅读 · 0 评论 -
二项式定理的应用(快速幂+组合数的计算)
1.题目引入:给定一个多项式(ax+by)k(ax+by)k,请求出多项式展开后xnymxnym项的系数。输入格式共一行,包含55个整数,分别为a,b,k,n,ma,b,k,n,m每两个整数之间用一个空格隔开。输出格式输出共11行,包含一个整数,表示所求的系数,这个系数可能很大,输出对1000710007取模后的结果。数据范围对于30%30%的数据,有0≤k≤100≤k≤10。对于50%50%的数据,有a=1,b=1a=1,b=1。对于...原创 2021-10-06 21:45:47 · 554 阅读 · 0 评论 -
欧拉函数如何打表?
1.题目引入:The Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gcd(a,b) = 1 arranged in increasing order. The first few areF2 = {1/2}F3 = {1/3, 1/2, 2/3}F4 = {1/4, 1/3,...原创 2021-08-28 11:16:31 · 198 阅读 · 0 评论 -
欧拉函数 模板题
1.题目引入:Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are no integers x > 1, y > 0, z > 0 such that a = xy and b = xz.InputThere are several原创 2021-08-27 19:51:48 · 179 阅读 · 0 评论 -
分 解 质 因 数
1、题目引入:While skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh University,noticed that the telephone number of his brother-in-law H. Smith had the following peculiar property: The sum of the digits of that number was equal原创 2021-08-26 17:13:56 · 80 阅读 · 0 评论