当前位置:网站首页>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;
}
边栏推荐
- C# ManualResetEvent 类的理解
- kotlin位运算的坑(bytes[i] and 0xff 报错)
- ArcServer密码重置(账号不可以重置)
- MinIO纠错码、分布式MinIO集群搭建及启动
- Small guide for rapid completion of mechanical arm (VI): stepping motor driver
- Index method and random forest to realize the information of surface water body in wet season in Shandong Province
- srpingboot security demo
- 【笔记】电商订单数据分析实战
- Smartinstantiationawarebeanpostprocessor of the extension point series determines which construction method to execute - Chapter 432
- 68 cesium code datasource loading czml
猜你喜欢

DHT11 温湿度传感器

机械臂速成小指南(六):步进电机驱动器

Transformer le village de tiantou en un village de betteraves sucrières

Advanced drawing skills of Excel lecture 100 (1) - use Gantt chart to show the progress of the project

Database problems, how to optimize Oracle SQL query statements faster and more efficient

论文学习记录随笔 多标签之LIFT

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

3D printer threading: five simple solutions

TIDB数据库特性总结

Crossing pie · pie pan + Mountain duck = local data management
随机推荐
Advanced drawing skills of Excel lecture 100 (1) - use Gantt chart to show the progress of the project
He struggled day and night to protect his data
基于LabVIEW的计时器
OpenGL ES: (3) EGL、EGL绘图的基本步骤、EGLSurface、ANativeWindow
SystemVerilog学习-08-随机约束和线程控制
69 Cesium代码datasource加载geojson
让田头村变甜头村的特色农产品是仙景芋还是白菜
Oracle create user + Role
表格中el-tooltip 实现换行展示
Scope data export mat
穿越派·派盘 + Mountain Duck = 数据本地管理
Know the future of "edge computing" from the Nobel prize!
El tooltip in the table realizes line breaking display
3D printer threading: five simple solutions
数据库er图组成要素
DHT11 temperature and humidity sensor
One of the characteristic agricultural products that make Tiantou village, Guankou Town, Xiamen into a "sweet" village is
How to transmit and share 4GB large files remotely in real time?
OpenGL es: (2) relationship between OpenGL es, EGL and glsl
Transformer le village de tiantou en un village de betteraves sucrières