当前位置:网站首页>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;
}
边栏推荐
- 【暑期每日一题】洛谷 P1629 邮递员送信(未完待续...)
- QDataStream的簡單讀寫驗證
- Use of dataloader
- LeetCode_ 53 (maximum subarray and)
- Simple read / write verification of qdatastream
- Explanation of characteristics of hydraulic slip ring
- Serialization and deserialization of objects
- Receiving package install and uninstall events
- 1076 Forwards on Weibo
- Print stream and system setout();
猜你喜欢
智慧运维:基于 BIM 技术的可视化管理系统
Distributed transactions - Solutions
Leetcode522- longest special sequence ii- hash table - String - double pointer
Neural networks - use of maximum pooling
0xc000007b应用程序无法正常启动解决方案(亲测有效)
Actual combat: gateway api-2022.2.13
Daily question -leetcode1175- permutation of prime numbers - Mathematics
Pytoch (III) -- function optimization
Copier le matériel de conseils de bébé ne peut pas être vide, comment résoudre?
The longest increasing subsequence and its optimal solution, total animal weight problem
随机推荐
Pico Neo3手柄抓取物体
Global and Chinese market of solder wire 2022-2028: Research Report on technology, participants, trends, market size and share
Buffer stream and transform stream
CockroachDB 分布式事务源码分析之 TxnCoordSender
Global and Chinese market of mainboard 2022-2028: Research Report on technology, participants, trends, market size and share
Leetcode1497- check whether array pairs can be divided by K - array - hash table - count
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
LeetCode_ 66 (plus one)
Pytoch (II) -- activation function, loss function and its gradient
Intelligent operation and maintenance: visual management system based on BIM Technology
Daily question -leetcode1175- permutation of prime numbers - Mathematics
对象的序列化与反序列化
Fitness without equipment
Global and Chinese market of search engine optimization (SEO) software 2022-2028: Research Report on technology, participants, trends, market size and share
LeetCode1497-检查数组对是否可以被 k 整除-数组-哈希表-计数
线程类的几大创建方法
Neural network convolution layer
Thread safety issues
Detailed explanation of distributed global unique ID solution
解决:拖动xib控件到代码文件中,报错setValue:forUndefinedKey:this class is not key value coding-compliant for the key