当前位置:网站首页>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-哈希表-字符串-双指针
- Is there any good website or software for learning programming? [introduction to programming]?
- 线程安全问题
- How to hide browser network IP address and modify IP internet access?
- Programmers dig "holes" to get rich: if they find a loophole, they will be rewarded 12.72 million yuan
- Leetcode316- remove duplicate letters - stack - greedy - string
- Daily question -leetcode1175- permutation of prime numbers - Mathematics
- Global and Chinese market of protection circuit modules 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
猜你喜欢
![[summer daily question] Luogu p5886 Hello, 2020!](/img/ac/4be05f80aab7fb766674e6e2d16fbc.png)
[summer daily question] Luogu p5886 Hello, 2020!

Neural networks - use sequential to build neural networks

Manually implement a simple stack

複制寶貝提示材質不能為空,如何解决?

导电滑环短路的原因以及应对措施

Vmware workstation network card settings and three common network modes

Copier le matériel de conseils de bébé ne peut pas être vide, comment résoudre?

Oracle views the creation time of the tablespace in the database

Distributed architecture system splitting principles, requirements and microservice splitting steps

CockroachDB 分布式事务源码分析之 TxnCoordSender
随机推荐
QDataStream的簡單讀寫驗證
手动实现一个简单的栈
Precautions for use of conductive slip ring
Causes of short circuit of conductive slip ring and Countermeasures
CockroachDB 分布式事务源码分析之 TxnCoordSender
Worried about infringement? Must share copyrightless materials on the website. Don't worry about the lack of materials for video clips
Actual combat: gateway api-2022.2.13
LevelDB源码分析之LRU Cache
Use and modification of prior network model
AssertionError assert I.ndim == 4 and I.shape[1] == 3
複制寶貝提示材質不能為空,如何解决?
Solution: thread 1:[< *> setvalue:forundefined key]: this class is not key value coding compliant for the key*
【暑期每日一题】洛谷 P1629 邮递员送信(未完待续...)
Distributed transactions - Solutions
Unity drags and modifies scene camera parameters under the editor
Intelligent operation and maintenance: visual management system based on BIM Technology
点赞的云函数
Take a cold bath
Global and Chinese market of search engine optimization (SEO) software 2022-2028: Research Report on technology, participants, trends, market size and share
1076 Forwards on Weibo