当前位置:网站首页>Mathematical knowledge: finding the number of divisors
Mathematical knowledge: finding the number of divisors
2022-07-01 05:08:00 【zheng. ys】

#include<iostream>
#include<algorithm>
#include<unordered_map>
using namespace std;
typedef long long ll;
const int N=1e9+7;
int main()
{
int n;
cin>>n;
unordered_map<int,int>zheng;
while(n--)
{
int x;
cin>>x;
for(int i=2;i<=x/i;i++)
while(x%i==0)
{
x/=i;
zheng[i]++;
}
if(x>1)zheng[x]++;
}
ll ans=1;
for(unordered_map<int,int>::iterator i=zheng.begin();i!=zheng.end();i++)
ans=ans*(i->second+1)%N;
cout<<ans<<endl;
return 0;
}
边栏推荐
- What can the points mall Games bring to businesses? How to build a points mall?
- Global and Chinese market of 3D design and modeling software 2022-2028: Research Report on technology, participants, trends, market size and share
- Global and Chinese market of solder wire 2022-2028: Research Report on technology, participants, trends, market size and share
- Implementation of distributed lock
- Character input stream and character output stream
- Basic skeleton of neural network nn Use of moudle
- How to meet the requirements of source code confidentiality and source code security management
- LeetCode316-去除重复字母-栈-贪心-字符串
- Vmware workstation network card settings and three common network modes
- AcWing 888. Finding combinatorial number IV (the problem of finding combinatorial number with high precision)
猜你喜欢

el-cascader回显失败;el-cascader回显不出来

LevelDB源码分析之LRU Cache

Fitness without equipment

复制宝贝提示材质不能为空,如何解决?

Solution: drag the Xib control to the code file, and an error setvalue:forundefined key:this class is not key value coding compliant for the key is reported

Vmware workstation network card settings and three common network modes

How to use common datasets in pytorch

Manually implement a simple stack

导电滑环使用的注意事项

el-form表单新增表单项动态校验;el-form校验动态表单v-if不生效;
随机推荐
Pytoch (III) -- function optimization
Pytorch convolution operation
【暑期每日一题】洛谷 P1568 赛跑
Application of industrial conductive slip ring
线程安全问题
Explanation of characteristics of hydraulic slip ring
[NLP Li Hongyi] notes
Thread safety issues
AcWing 887. Finding combinatorial number III (Lucas theorem)
LeetCode316-去除重复字母-栈-贪心-字符串
分布式-总结列表
[hard ten treasures] - 1 [basic knowledge] classification of power supply
Rust hello-word
Query long transaction
Youqitong [vip] v3.7.2022.0106 official January 22 Edition
STM32 expansion board digital tube display
C# wpf 使用DockPanel实现截屏框
CockroachDB: The Resilient Geo-Distributed SQL Database 论文阅读笔记
LeetCode_ 28 (implement strstr())
字符输入流与字符输出流