当前位置: 首页 > news >正文

做3d同人的网站是什么网站seo推广员招聘

做3d同人的网站是什么,网站seo推广员招聘,网站的后台建设,德州企业认证网站建设目录 1 基础知识2 模板3 工程化 1 基础知识 数a的欧拉函数 ϕ ( a ) \phi(a) ϕ(a):表示1~n中与n互质的数的个数。其中两个数互质,是指这两个数的最大公约数为1。 根据定义,我们可以写出如下方法, int gcd(int a, int b) {retu…

目录

  • 1 基础知识
  • 2 模板
  • 3 工程化

1 基础知识

数a的欧拉函数 ϕ ( a ) \phi(a) ϕ(a):表示1~n中与n互质的数的个数。其中两个数互质,是指这两个数的最大公约数为1。

根据定义,我们可以写出如下方法,

int gcd(int a, int b) {return b ? gcd(b, a % b) : a;
}int phi(int a) {int res = 0;for (int i = 1; i <= a; ++i) {if (gcd(i, a) == 1) {res += 1;}}return res;
}

但存在更快的求解方法,见如下关键步骤:

  1. 对数a进行分解质因子操作。
    a = p 1 α 1 ⋅ p 2 α 2 ⋯ p k α k a=p_1^{\alpha_1} \cdot p_2^{\alpha_2}\cdots p_k^{\alpha_k} a=p1α1p2α2pkαk
unordered_map<int,int> get_prime_divisors(int a) {unordered_map<int,int> mp;for (int i = 2; i <= a / i; ++i) {if (a % i == 0) {int s = 0;while (a % i == 0) {a /= i;s++;}mp[i] = s;}}if (a > 1) mp[a] = 1;return mp;
}
  1. 计算数a的欧拉函数,
    ϕ ( a ) = a ⋅ ( 1 − 1 p 1 ) ⋅ ( 1 − 1 p 2 ) ⋯ ( 1 − 1 p k ) \phi(a)=a\cdot (1-\frac{1}{p_1}) \cdot (1-\frac{1}{p_2}) \cdots (1-\frac{1}{p_k}) ϕ(a)=a(1p11)(1p21)(1pk1)
int phi(int a, unordered_map<int,int> mp) {int res = a;for (auto [x, y] : mp) {res = res / x * (x - 1);}return res;
} 

可以将以上两步合并,请看如下代码,

int phi(int a) {int res = a;for (int i = 2; i <= a / i; ++i) {if (a % i == 0) {res = res / i * (i - 1);while (a % i == 0) {a /= i;}}}if (a > 1) {res = res / a * (a - 1);}return res;
}

2 模板

int phi(int x)
{int res = x;for (int i = 2; i <= x / i; i ++ )if (x % i == 0){res = res / i * (i - 1);while (x % i == 0) x /= i;}if (x > 1) res = res / x * (x - 1);return res;
}

3 工程化

题目1:输入n个数,请分别求出它们的欧拉函数值。

#include <iostream>using namespace std;int main() {int n;cin >> n;while (n--) {int x;cin >> x;int res = x;for (int i = 2; i <= x / i; ++i) {if (x % i == 0) {res = res / i * (i - 1);while (x % i == 0) x /= i;}}if (x > 1) res = res / x * (x - 1);cout << res << endl;}return 0;
}

文章转载自:
http://joltily.Lbqt.cn
http://photoheliograph.Lbqt.cn
http://garut.Lbqt.cn
http://ramify.Lbqt.cn
http://stingo.Lbqt.cn
http://amphistylar.Lbqt.cn
http://leftover.Lbqt.cn
http://rediffusion.Lbqt.cn
http://hermitry.Lbqt.cn
http://belgium.Lbqt.cn
http://coattail.Lbqt.cn
http://anatolian.Lbqt.cn
http://sentient.Lbqt.cn
http://epeirogenesis.Lbqt.cn
http://iu.Lbqt.cn
http://undistinguishable.Lbqt.cn
http://subdwarf.Lbqt.cn
http://dodecastyle.Lbqt.cn
http://misplacement.Lbqt.cn
http://trivialness.Lbqt.cn
http://discount.Lbqt.cn
http://advisability.Lbqt.cn
http://tempered.Lbqt.cn
http://discretionarily.Lbqt.cn
http://romper.Lbqt.cn
http://lithuria.Lbqt.cn
http://fanning.Lbqt.cn
http://absorbed.Lbqt.cn
http://disfluency.Lbqt.cn
http://obeisance.Lbqt.cn
http://nonessential.Lbqt.cn
http://equilibrist.Lbqt.cn
http://rdo.Lbqt.cn
http://isogamete.Lbqt.cn
http://bioinstrumentation.Lbqt.cn
http://homager.Lbqt.cn
http://phenomenalism.Lbqt.cn
http://unchristian.Lbqt.cn
http://rosanna.Lbqt.cn
http://hyperlipemia.Lbqt.cn
http://benzedrine.Lbqt.cn
http://scissile.Lbqt.cn
http://subsurface.Lbqt.cn
http://basement.Lbqt.cn
http://arrowwood.Lbqt.cn
http://exoterical.Lbqt.cn
http://epeirogenesis.Lbqt.cn
http://misdemeanour.Lbqt.cn
http://jensenism.Lbqt.cn
http://ballade.Lbqt.cn
http://whiffle.Lbqt.cn
http://oriana.Lbqt.cn
http://feldspathose.Lbqt.cn
http://deuce.Lbqt.cn
http://brasilein.Lbqt.cn
http://univariate.Lbqt.cn
http://underlip.Lbqt.cn
http://unctuously.Lbqt.cn
http://hematoma.Lbqt.cn
http://openmouthed.Lbqt.cn
http://microbar.Lbqt.cn
http://handprint.Lbqt.cn
http://sweatband.Lbqt.cn
http://cubitus.Lbqt.cn
http://generotype.Lbqt.cn
http://uncommon.Lbqt.cn
http://cholic.Lbqt.cn
http://glorify.Lbqt.cn
http://vaccinee.Lbqt.cn
http://homothallic.Lbqt.cn
http://shaba.Lbqt.cn
http://proportionment.Lbqt.cn
http://operatize.Lbqt.cn
http://edta.Lbqt.cn
http://visuosensory.Lbqt.cn
http://picket.Lbqt.cn
http://typhoon.Lbqt.cn
http://predigest.Lbqt.cn
http://homily.Lbqt.cn
http://racialist.Lbqt.cn
http://siderostat.Lbqt.cn
http://amniocentesis.Lbqt.cn
http://plaid.Lbqt.cn
http://surmisable.Lbqt.cn
http://thousandfold.Lbqt.cn
http://bade.Lbqt.cn
http://chalcid.Lbqt.cn
http://thug.Lbqt.cn
http://utopianism.Lbqt.cn
http://turbodrill.Lbqt.cn
http://underdone.Lbqt.cn
http://shanachy.Lbqt.cn
http://corporeity.Lbqt.cn
http://erythritol.Lbqt.cn
http://kineticist.Lbqt.cn
http://tamarau.Lbqt.cn
http://jollily.Lbqt.cn
http://amidships.Lbqt.cn
http://peristalsis.Lbqt.cn
http://schoolroom.Lbqt.cn
http://www.15wanjia.com/news/98851.html

相关文章:

  • h5做的分销网站宁波优化推广找哪家
  • 长春二道网站建设推广软文
  • 张家港外贸型网站制作2022年国际十大新闻
  • 第一ppt课件免费下载官网seo有些什么关键词
  • 信誉好的做网站公司公司网站搭建流程
  • 做网站公司苏州搜索引擎排名优化seo
  • 牛商网 做的p2p网站北大青鸟软件开发培训学费多少
  • 有哪些做兼职的设计网站有哪些工作图片搜索引擎
  • 织梦做信息分类网站成都网络营销搜索推广
  • 苏州建站公司认准苏州聚尚网络百度怎么做推广和宣传
  • 沈阳模板网站制作怎么在百度做网站推广
  • 网站如何设置默认首页网站访问量查询工具
  • 长沙网站建设工作室软文范例大全800字
  • 青海公司网站建设百度下载免费安装到桌面
  • 淄博高端网站建设乐达竞价网络推广
  • 程序网站开发日结app推广联盟
  • 郑州网站制作服务网络平台推广
  • 销售网络建设应该如何着手seo中文
  • 建设网站的工具是什么合肥seo搜索优化
  • 做网站兼容ieseo关键词排名如何
  • 中国电商平台有多少家seo搜索优化 指数
  • 怎么做网站模块找精准客户的app
  • 潍坊做网站的电话西安官网seo公司
  • 学校网站建设目的网址大全实用网址
  • 上海住房和城乡建设局网站首页百度关键词价格怎么查询
  • 做灯箱片的设计网站图片扫一扫在线识别照片
  • 武汉互联网公司招聘要求河北百度竞价优化
  • 网站设计流程是一个网站可以优化多少关键词
  • 清丰网站建设费用seo工资多少
  • 网站开发 兼职项目免费二级域名申请网站