当前位置:网站首页>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;
}
边栏推荐
- LeetCode522-最长特殊序列II-哈希表-字符串-双指针
- What can the points mall Games bring to businesses? How to build a points mall?
- Global and Chinese markets for business weather forecasting 2022-2028: Research Report on technology, participants, trends, market size and share
- [hardware ten treasures catalogue] - reprinted from "hardware 100000 whys" (under continuous update ~ ~)
- Global and Chinese market of metal oxide semiconductor field effect transistors 2022-2028: Research Report on technology, participants, trends, market size and share
- 线程类的几大创建方法
- 复制宝贝提示材质不能为空,如何解决?
- Youqitong [vip] v3.7.2022.0106 official January 22 Edition
- CockroachDB 分布式事务源码分析之 TxnCoordSender
- Detailed explanation of distributed global unique ID solution
猜你喜欢
AssertionError assert I.ndim == 4 and I.shape[1] == 3
How to select conductive slip ring material
【暑期每日一题】洛谷 P5886 Hello, 2020!
Leetcode522- longest special sequence ii- hash table - String - double pointer
每日一题-LeetCode1175-质数排列-数学
Go learning notes (5) basic types and declarations (4)
Daily question -leetcode1175- permutation of prime numbers - Mathematics
解决:拖动xib控件到代码文件中,报错setValue:forUndefinedKey:this class is not key value coding-compliant for the key
分布式事务-解决方案
手动实现一个简单的栈
随机推荐
LevelDB源码分析之memtable
AssertionError assert I.ndim == 4 and I.shape[1] == 3
HCIP Day13
How to select conductive slip ring material
FileInputStream
分布式-总结列表
液压滑环的特点讲解
Basic skeleton of neural network nn Use of moudle
Global and Chinese market of 3D CAD 2022-2028: Research Report on technology, participants, trends, market size and share
【暑期每日一题】洛谷 P2026 求一次函数解析式
AcWing 884. Gauss elimination for solving XOR linear equations
线程类的几大创建方法
Neural networks - use sequential to build neural networks
[daily question in summer] Luogu p1568 race
Leetcode1497- check whether array pairs can be divided by K - array - hash table - count
导电滑环短路的原因以及应对措施
数字金额加逗号;js给数字加三位一逗号间隔的两种方法;js数据格式化
工业导电滑环的应用
Solution: thread 1:[< *> setvalue:forundefined key]: this class is not key value coding compliant for the key*
Pytoch (II) -- activation function, loss function and its gradient