当前位置:网站首页>Factorial divisor (unique decomposition theorem)
Factorial divisor (unique decomposition theorem)
2022-07-01 06:07:00 【Great intelligence】
Title Description
Define factorial n! = 1 × 2 × 3 × · · · × n.
Excuse me, 100!(100 The factorial ) How many positive divisors are there .
analysis : A positive divisor is a positive factor , Separate factorials , The law of multiplicative distribution is used ; You need to combine the relevant knowledge of this blog
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll a[110];
int main()
{
for(int i=1;i<=100;i++)
{
int tmp=i;
for(int j=2;j<=tmp;j++)// from 2 Start
{
while(tmp%j==0)// All non prime numbers are multiples So it's gone
{
a[j]++;
tmp/=j;
}
}
}
ll ans=1;
for(int i=1;i<=100;i++)
{
if(a[i])
ans*=(1+a[i]);
}
cout<<ans<<endl;
}
边栏推荐
- 讓田頭村變甜頭村的特色農產品是仙景芋還是白菜
- 可动的机械挂钟
- Leetcode Max rectangle, Max square series 84 85. 221. 1277. 1725. (monotonic stack, dynamic programming)
- OpenGL ES: (4) EGL API详解 (转)
- Smartinstantiationawarebeanpostprocessor of the extension point series determines which construction method to execute - Chapter 432
- SOE空间分析服务器 MySQL以及PostGres的地理空间库PostGIS防注入攻击
- excel可视化
- Flink实战--多流合并
- Oracle 序列+触发器
- 穿越派·派盘 + 思源笔记 = 私人笔记本
猜你喜欢

LED lighting used in health lighting

蚂蚁新村田头村变甜头村 让厦门灌口镇田头村变甜头村的特色农产品之一是

云盘里资料被和谐了,怎么办?

three. JS summary

无限水平大理石游戏

OpenGL ES: (3) EGL、EGL绘图的基本步骤、EGLSurface、ANativeWindow

Preliminary level of C language -- selected good questions on niuke.com

QT write custom control - self drawn battery

C language beginner level - realize the minesweeping game

Cjc8988 Low Power Stereo codec with 2 stereo headphone drivers
随机推荐
健康照明中应用的LED照明灯
SystemVerilog学习-07-类的继承和包的使用
OpenGL es: (4) detailed explanation of EGL API (Continued)
highmap gejson数据格式转换脚本
Orcle创建用户+角色
Send you through the data cloud
Excel dynamic chart
Pla ne colle pas sur le lit: 6 solutions simples
SOE spatial analysis server MySQL and PostGIS geospatial database of Postgres anti injection attack
Stack Title: parsing Boolean expressions
srpingboot security demo
穿越派·派盘 + 思源笔记 = 私人笔记本
He struggled day and night to protect his data
关于一道01背包问题的·拓展题的思考
Essay learning record essay multi label Global
excel动态图表
Advanced drawing skills of Excel lecture 100 (1) - use Gantt chart to show the progress of the project
Fixed height of the first column in El table dynamic header rendering
讓田頭村變甜頭村的特色農產品是仙景芋還是白菜
My experience from technology to product manager