摘要:
Problem Description Given a prime P, 2 #include#include#include#include#include#include#include#include#include#include#include... 阅读全文
posted @ 2022-09-20 22:57
老程序员111
阅读(19)
评论(0)
推荐(0)
摘要:
这两天主要把之前的数论模版整理了一下,把没看的 BSGS 与扩展 BSGS 补上了,并且看了看之前没接触过的不定方程组,主要看了看毕达哥拉斯三元组与佩尔方程原理,明后天把这些模版整理一下 阅读全文
posted @ 2022-09-20 22:57
老程序员111
阅读(8)
评论(0)
推荐(0)
摘要:
【概述】 BSGS(Baby Step Giant Step)算法,又称大小步算法,其主要用于解形如 的高次同余方程中的 x,其核心思想是分块。 当 A 与 C 互质时,通过费马小定理: 可知,当 时,会出现一个循环节,于是就能保证答案 x 若存在,必然有... 阅读全文
posted @ 2022-09-20 22:57
老程序员111
阅读(66)
评论(0)
推荐(0)
摘要:
Problem Description Computer generated and assisted proofs and verification occupy a small niche in the realm of Computer Scien... 阅读全文
posted @ 2022-09-20 22:57
老程序员111
阅读(30)
评论(0)
推荐(0)
摘要:
【定义】 满足 的 三元组称为毕达哥拉斯三元组,当 时,称其为本原的。 毕达哥拉斯三元组,也称为勾股数。 【性质】 由 x、y、z 构成的三元组 (x,y,z) ,其中 y 为偶数,那么由他们构成的本原的毕达哥拉斯三元组 等价于: 存在互素的一奇一偶的正... 阅读全文
posted @ 2022-09-20 22:57
老程序员111
阅读(287)
评论(0)
推荐(0)
摘要:
【定义】 对正整数 n,欧拉函数是小于等于 n 的数中与 n 互质的数的个数,记作: 例如:,因为 1、3、5、7 均与 8 互质。 【性质】 1)若 n 为一素数 p,则: 2)若 n 为一素数 p 的幂次 ,则: 例如:要求 ,由于 16=2*2*2*2,... 阅读全文
posted @ 2022-09-20 22:57
老程序员111
阅读(236)
评论(0)
推荐(0)
摘要:
【调和级数】 调和级数是 的级数,在 n 趋于无穷时其部分和没有极限或部分和为无穷大。 一般情况下,我们需要求 其至今没有一个完全正确的公式,但当 n 很大时,可以使用欧拉给出的近似公式 其中,C 是欧拉常数,C ≈ 0.5772156649015328... 阅读全文
posted @ 2022-09-20 22:57
老程序员111
阅读(182)
评论(0)
推荐(0)
摘要:
Problem Description In mathematics, the nth harmonic number is the sum of the reciprocals of the first n natural numbers: I... 阅读全文
posted @ 2022-09-20 22:57
老程序员111
阅读(17)
评论(0)
推荐(0)
摘要:
Problem Description I was trying to solve problem '1234 - Harmonic Number', I wrote the following code long long H( int n ) { ... 阅读全文
posted @ 2022-09-20 22:57
老程序员111
阅读(24)
评论(0)
推荐(0)
摘要:
Problem Description You are given two integers: n and k, your task is to find the most significant three digits, and least sign... 阅读全文
posted @ 2022-09-20 22:57
老程序员111
阅读(13)
评论(0)
推荐(0)

浙公网安备 33010602011771号