当前位置:网站首页>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;
}
边栏推荐
- Receiving package install and uninstall events
- Basic skeleton of neural network nn Use of moudle
- 【暑期每日一题】洛谷 P7222 [RC-04] 信息学竞赛
- Application of industrial conductive slip ring
- [daily question in summer] first time, second time, deal!
- Fitness without equipment
- Some common commands of podman
- 对象的序列化与反序列化
- LeetCode_ 53 (maximum subarray and)
- Global and Chinese markets of superconductor 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
随机推荐
Pytorch convolution operation
[daily question in summer] function of rogu p3742 UMI
打印流与System.setout();
Several methods of creating thread classes
Global and Chinese markets for business weather forecasting 2022-2028: Research Report on technology, participants, trends, market size and share
【暑期每日一题】洛谷 P2026 求一次函数解析式
Receiving package install and uninstall events
Neural network convolution layer
FileOutPutStream
Pytoch (II) -- activation function, loss function and its gradient
[hardware ten treasures catalogue] - reprinted from "hardware 100000 whys" (under continuous update ~ ~)
AcWing 886. Finding combinatorial number II (pretreatment factorial)
How to meet the requirements of source code confidentiality and source code security management
Youqitong [vip] v3.7.2022.0106 official January 22 Edition
LeetCode_ 58 (length of last word)
Global and Chinese market of search engine optimization (SEO) software 2022-2028: Research Report on technology, participants, trends, market size and share
[une question par jour pendant l'été] course luogu p1568
LeetCode522-最长特殊序列II-哈希表-字符串-双指针
Causes of short circuit of conductive slip ring and Countermeasures
Go learning notes (5) basic types and declarations (4)


![[hard ten treasures] - 1 [basic knowledge] classification of power supply](/img/a8/f129c9d15ca6ed99db1dacfc750ead.png)




