因子个数打表
来源:互联网 发布:淘宝搞笑收件人名字女 编辑:程序博客网 时间:2024/06/05 08:51
/* ***********************************************┆ ┏┓ ┏┓ ┆┆┏┛┻━━━┛┻┓ ┆┆┃ ┃ ┆┆┃ ━ ┃ ┆┆┃ ┳┛ ┗┳ ┃ ┆┆┃ ┃ ┆┆┃ ┻ ┃ ┆┆┗━┓ 马 ┏━┛ ┆┆ ┃ 勒 ┃ ┆ ┆ ┃ 戈 ┗━━━┓ ┆┆ ┃ 壁 ┣┓┆┆ ┃ 的草泥马 ┏┛┆┆ ┗┓┓┏━┳┓┏┛ ┆┆ ┃┫┫ ┃┫┫ ┆┆ ┗┻┛ ┗┻┛ ┆************************************************ */#include <iostream>#include <set>#include <map>#include <stack>#include <cmath>#include <queue>#include <cstdio>#include <bitset>#include <string>#include <vector>#include <iomanip>#include <cstring>#include <algorithm>#include <functional>#define PI acos(-1)#define eps 1e-8#define inf 0x3f3f3f3f#define debug(x) cout<<"---"<<x<<"---"<<endltypedef long long ll;using namespace std;int y[500005] = {0};void getfactor(int n){ int x = sqrt(n); for (int i = 1; i <= x; i++) { for (int j = i + 1; j * i <= n; j++) { y[i * j] += 2; } y[i * i]++; }}int main(){ int n; cin >> n; getfactor(n); /*for (int i = 1; i <= n; i++) { cout << y[i] << endl; }*/ cout << "------" << y[n] << "-------" << endl; return 0;}/************************************************┆ ┏┓ ┏┓ ┆┆┏┛┻━━━┛┻┓ ┆┆┃ ┃ ┆┆┃ ━ ┃ ┆┆┃ ┳┛ ┗┳ ┃ ┆┆┃ ┃ ┆┆┃ ┻ ┃ ┆┆┗━┓ ┏━┛ ┆┆ ┃ ┃ ┆ ┆ ┃ ┗━━━┓ ┆┆ ┃ AC代马 ┣┓┆┆ ┃ ┏┛┆┆ ┗┓┓┏━┳┓┏┛ ┆┆ ┃┫┫ ┃┫┫ ┆┆ ┗┻┛ ┗┻┛ ┆************************************************ */
阅读全文
0 0
- 因子个数打表
- 质数快速筛法;欧拉函数线性打表;因子个数,因子和打表
- 打素数表找因子
- 因子和因子个数
- HDOJ 1215 七夕节(因子打表)
- nyoj 520 最大素因子(打表)
- HDU2521 反素数【因子数量+打表】
- Smith Numbers 素数打表+暴力+求素因子+poj
- NYOJ 题目767 因子和(打表)
- poj1365---素数打表和质因子分解
- HDU ACM 2521 反素数 水题+因子打表
- 奇因子个数
- POJ2992 Divisors【因子个数】
- 质因子个数统计
- 【PAT】因子个数
- **质因子个数
- POJ 2992 因子个数
- 问题 M: 因子个数
- 程序或-内存区域分配(五个段)--终于搞明白了
- watch的使用
- 287. Find the Duplicate Number [Leetcode]
- 实习项目一总结
- 哈密顿绕行世界问题
- 因子个数打表
- Vue用v-for给src属性赋值
- android用jxl读取Excel(2003,2007)
- 如何使用git提交代码到github主页上(基础)
- hdu 1556 Color the ball(线段树区间更新单点查询+懒惰标记)
- 深度学习第三章-概率与信息论笔记
- 关于已知两点经纬度求球面最短距离的公式推导
- Egret 之 消除游戏 开发 PART 6 Egret elimination game development PART 6
- [UVa 11093] 环形跑道(Just Finish it up)